!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.
!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.