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

Demoted !INCLUDE converts pandoc YAML header to ATX header #65

Closed jfishe closed 5 years ago

jfishe commented 5 years ago

!INCLUDE "file.md", 1 converts any YAML --- start markers to ### and copies the last line of the file as an ATX header. All headers in the file are ATX. Bare !INCLUDE "file.md" does not have the problem. It may be detecting a YAML marker as a SETEXT header but not checking the length of the line above to validate detection.

The work-around is pandoc file.md --atx-headers --to markdown --output tmp/file.md and change the mdpp file to !INCLUDE "tmp/file.md", 1. The mdpp file needs to include any desired YAML headers.

jfishe commented 5 years ago

Richland_Prefab_2BR.mdpp and Bathroom.md can be used as an example.