An empty line should separate two subsequent lists of the same type

I use Markdown to write notes, these notes often contain unnamed lists. I think it would be convenient and more predictable if

* alfa
* bravo
* charlie

* foo
* bar
* baz

would result in

<ul>
<li>alfa</li>
<li>bravo</li>
<li>charlie</li>
</ul>
<ul>
<li>foo</li>
<li>bar</li>
<li>baz</li>
</ul>

instead of

<ul>
<li><p>alfa</p></li>
<li><p>bravo</p></li>
<li><p>charlie</p></li>
<li><p>foo</p></li>
<li><p>bar</p></li>
<li><p>baz</p></li>
</ul>
2 Likes

Not a single implementation on babelmark does that, so it’s not likely to happen. Still, some way of interrupting a list without actual text could be useful.

I guess you are right. CommonMark just tries to be

a strongly defined, highly compatible specification of Markdown

Unfortunately there is no CommonMark implementation for Python with a modular parser system that allows for easy customization.

A workaround is to separate the lists with an HTML comment.

* a
* b
<!---->
* c
* d

Commonmark used to separate two lists if two or more empty lines were between them. Some implementations found on Babelmark still do that. I forgot why it was removed from the specification, but I think it happened in early 2016 or late 2015.

Interesting, the spec says

two blank lines end all containing lists

but the changelog says

Removed the “two blank lines breaks out of lists” rule.

and indeed, if you search the diff for “two blank lines” you’ll find that

A list item may not contain blocks that are separated by more than two blanks are contained in a [fenced code block]. Thus, two blank lines will end a list, unless the one blank line.

was replaced with

A list item may contain blocks that are separated by more than one blank line.

@jgm is this an inconsistency in the spec?

Yes, it’s an inconsistency, but it has already been fixed in a commit on July 20.