commonmark-spec icon indicating copy to clipboard operation
commonmark-spec copied to clipboard

Empty item in a loose list

Open mity opened this issue 5 years ago • 0 comments

Cmark and MD4C currently render

 * foo

 * 

 * bar

as

<ul>
<li>
<p>foo</p>
</li>
<li></li>
<li>
<p>bar</p>
</li>
</ul>

Current spec wording does not imho cover this case at all.

Renderers typically make the loose appearance by applying some margin rules to the nested blocks, so the empty <li></li> breaks that.

I am therefore wondering whether the implementation should emit <p></p> in empty loose list items to avoid that, and spec be updated to explicitly require this behavior.

mity avatar Apr 06 '19 07:04 mity