fletcher / MultiMarkdown-5

Reference implementation of MultiMarkdown; replaces MultiMarkdown v4 (deprecated -- see MMD-6 instead)
https://github.com/fletcher/MultiMarkdown-6
Other
294 stars 46 forks source link

Bug: File Transclusion will strip away the first line if there's some spaces #22

Open ickc opened 8 years ago

ickc commented 8 years ago

Here is a MWE showing the bug: temp.zip

In the original folder, things are working as expected.

In the bug folder, in file ch1.md, ch2.md, I put 2 spaces in the line between the metadata front matter and the first header. In the transcluded file master.html, you will see that the header of ch1.md, ch2.md has gone.

fletcher commented 8 years ago

So don't put spaces in there. :)

jasedit commented 8 years ago

While I'm no fan of trailing whitespace, I believe I've come up with a minimal fix to avoid whitespace fooling the metadata detection. It fixes the MWE case in my testing