fletcher / MultiMarkdown-4

This project is now deprecated. Please use MultiMarkdown-6 instead!
https://github.com/fletcher/MultiMarkdown-5
Other
306 stars 59 forks source link

Markdown inside html is always been processed #97

Closed tillsc closed 9 years ago

tillsc commented 9 years ago

As far as I understand the --process-html switch (or the EXT_PROCESS_HTML extension bit) Markdown code inside html tags should not be processed by default (without the extension enabled). So I would expect echo '<span>_Test_</span>' | multimarkdown to return <span>_Test_</span>. But it processes the inner Markdown and returns <span><em>Test</em></span>

echo '<span>_Test_</span>' | multimarkdown --process-html returns exactly the same result. So the switch (same as the extension) seems to have no effect at all.

Should be reproducible with MultiMarkdown version 4.6 in MacOs shell and directly via C calls with or without the EXT_PROCESS_HTML bit set.

fletcher commented 9 years ago

This is actually standard Markdown.pl behavior. <span> isn't a block level HTML tag, so it gets ignored in the processing.

One can debate whether this is the best behavior, but according to Markdown.pl this is the "right" behavior:

http://johnmacfarlane.net/babelmark2/?normalize=1&text=%3Cspan%3E_Test_%3C%2Fspan%3E%0A%0A%3Cdiv%3E%0A_Test_%0A%3C%2Fdiv%3E