Milian Wolff
2007-Sep-02 12:56 UTC
[Possible Bug]: Additional <p> wrapper around HTML input
I hope this is not by design and not an already discussed bug. Take the following input: <hr id="foo" /> <hr id="foo"> <hr id="foo"/> <hr id="foo" /> <hr id="foo"> <hr id="foo"/> If this is run through Markdown a paragraph will wrap hr's numer 4-6. This behaviour can be found in both Markdown.pl and Markdown.php (I used the Dingus provided on the project pages). Interesting is, that Markdown Extra handles this correctly. PS: The above input is a snippet from `MDTest/markdown.mdtest/Inline HTML (Simple).text` -- Milian Wolff http://milianw.de
Michel Fortin
2007-Sep-02 14:44 UTC
[Possible Bug]: Additional <p> wrapper around HTML input
Le 2007-09-02 ? 8:56, Milian Wolff a ?crit :> <hr id="foo" /> > <hr id="foo"> > <hr id="foo"/>Well, it's a documented limitation on the Markdown syntax page: "The only restrictions are that block-level HTML elements -- e.g. `<div>`, `<table>`, `<pre>`, `<p>`, etc. -- must be separated from surrounding content by blank lines, and the start and end tags of the block should not be indented with tabs or spaces." "hr" is a block-level element, but you have not separated them by a blank line. This is a "designed" limitation to simplify the parser. It doesn't mean a parser shouldn't do better, and I believe John is trying to improve Markdown.pl to remove some limitations like this one.> Interesting is, that Markdown Extra handles this correctly.Indeed, Markdown Extra's HTML block parser is much better at that than PHP Markdown's or the one in Markdown.pl. Michel Fortin michel.fortin at michelf.com http://www.michelf.com/