Allow selectors on next line by dmitry-timofeev · Pull Request #10 · rnorth/mkdocs-codeinclude-plugin
Allows targeting expressions to be on the next line:
<!--codeinclude--> <!-- On the same line --> [Title](long/long/Path) targeting_expr1 <!-- On the next line --> [Title2](long/long/Path) targeting_expr2 <!--/codeinclude-->
I kept the usage of a regular expression to find the include definitions, but had to change the implementation to use re.findall and a multiline expression instead of re.match over a single line.
The processing is now separated into three stages:
- Code-include block extraction.
- Computing substitutes (patches) for each block.
- Application of patches to the original markdown.
Resolves #9