amyreese / markdown-pp

Preprocessor for Markdown files to generate a table of contents and other documentation needs
MIT License
309 stars 68 forks source link

!INCLUDE should support a shift parameter #15

Closed scls19fr closed 8 years ago

scls19fr commented 9 years ago

Hello,

it will be nice if !INCLUDE could have a shift parameter.

01.md looks like

# Title 1
## Title 1.1
## Title 1.2
# Title 2
## Title 2.1
## Title 2.2

01_sub.md looks like

I would like to get a Mardown document like

# Title 1
## Title 1.1
## Title 1.2
# Title 2
## Title 2.1
## Title 2.2
### SubTitle 1
#### SubTitle 1.1
#### SubTitle 1.2
### SubTitle 2
#### SubTitle 2.1
#### SubTitle 2.2

index.mdpp

!INCLUDE "01.md"
!INCLUDE "01_sub.md", 2

2 would be this shift parameter

What is your opinion about it ?

Kind regards

leotrs commented 8 years ago

@scls19fr if there's still interest in this, can you post the example 01_sub.md file so I can work on a PR? It seems it didn't get included correctly in your original issue. Thanks.

scls19fr commented 8 years ago

Hi @Leockard

01_sub.md could be

# SubTitle 1
## SubTitle 1.1
## SubTitle 1.2
# SubTitle 2
## SubTitle 2.1
## SubTitle 2.2

and so

!INCLUDE "01_sub.md", 2

will create and include

### SubTitle 1
#### SubTitle 1.1
#### SubTitle 1.2
### SubTitle 2
#### SubTitle 2.1
#### SubTitle 2.2
leotrs commented 8 years ago

@scls19fr @jreese Linky.