commonmark-spec
commonmark-spec copied to clipboard
Empty item in a loose list
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.