cmacmackin / markdown-include

Provides syntax for Python-Markdown which allows for the inclusion of the contents of other Markdown documents.
GNU General Public License v3.0
104 stars 41 forks source link

Indented included source gets indented #30

Open BarnabasSzabolcs opened 3 years ago

BarnabasSzabolcs commented 3 years ago

Consider the following situation:

=== "source"
    ` ` `python
    {!my_source.py!}
    ` ` `

and

print('Hello, world!')

Here we'd expect

=== "source"
    ` ` `python
    print('Hello, world!')
    ` ` `

That is, every line of my_source.py gets as many tabs and spaces as many is leading the inclusion tag.

This pull request enables this inclusion mode.

BarnabasSzabolcs commented 3 years ago

@cmacmackin Chris, your plugin was very useful to me, thanks a lot for sharing it!🚀 I hope to give an addition that is not in conflict with the current functionality and is useful to others, too.

My use case is: https://squidfunk.github.io/mkdocs-material/reference/content-tabs/#superfences