Quoting spec here:
A list item can begin with at most one blank line. In the following example, foo is not part of the list item:
So foo shouldn't be part of the list, and I was able to verify that it indeed isn't:
$ echo -e '-\n\n foo' | ./commonmark.js/bin/commonmark
<ul>
<li></li>
</ul>
<p>foo</p>
However, adding a couple of spaces to each line makes it so commonmark.js doesn't seem to consider those lines blank anymore:
$ echo -e '- \n \n foo' | ./commonmark.js/bin/commonmark
<ul>
<li>foo</li>
</ul>
Which is probably a bug here, since a line that consists entirely of whitespaces is still considered a blank line according to spec.
cmark parses this correctly:
$ echo -e '- \n \n foo' | ./cmark/build/src/cmark
<ul>
<li></li>
</ul>
<p>foo</p>
Quoting spec here:
So
fooshouldn't be part of the list, and I was able to verify that it indeed isn't:However, adding a couple of spaces to each line makes it so commonmark.js doesn't seem to consider those lines blank anymore:
Which is probably a bug here, since a line that consists entirely of whitespaces is still considered a blank line according to spec.
cmarkparses this correctly: