Skip to content

HTML tags that are display:block by default are messed up when multiline #342

@ghost

Description

Certain HTML tags when messed up when multiline, and as far as I can tell it's the ones that are display:block by default.

Found on v2.3.6, installed from the FreeBSD py37-markdown2 port; I checked out the repo and ran v2.3.8 to make sure and it was not fixed.

Testcases (I use <wc> because I originally ran into this with a custom web component):


<wc>
<div>
</div>
</wc>

Produces (incorrect):

<p><wc></p>

<div>
</div>

<p></wc></p>

<wc>  
<pre>
</pre>
</wc>

Produces (incorrect):

<p><wc></p>

<pre>
</pre>

<p></wc></p>

<wc>
<h1>
</h1>
</wc>

Produces (incorrect):

<p><wc></p>

<h1>
</h1>

<p></wc></p>

<wc>
<span>
</span>
</wc>

Produces (correct):

<p><wc>
<span>
</span>
</wc></p>

<wc>
<invalid>
</invalid>
</wc>

Produces (correct):

<p><wc>
<invalid>
</invalid>
</wc></p>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions