timvink / mkdocs-table-reader-plugin

MkDocs plugin that enables a markdown tag like {{ read_csv('table.csv') }} to directly insert various table formats into a page
https://timvink.github.io/mkdocs-table-reader-plugin/
MIT License
120 stars 20 forks source link

Add support for fixing indentation in jinja #69

Closed timvink closed 4 weeks ago

timvink commented 4 weeks ago

@fralau mkdocs-macros-plugin will not keep the indentation if you insert multiple lines. This is a problem for example when inserting a table into a content tab.

I've fixed this by adding a custom filter to macros. See the PR, should be clear.

Perhaps you have a better solution, solving this natively inside the macros plugin? If not, you might want to copy the add_indentation filter to macros by default and document it's usage with an example in the macros docs.