Currently CommonMark does not require a blank line between a regular paragraph and a list. In this respect it differs from most current implementations.
John Gruber made his intentions clear on this, too; although the syntax description says nothing about it, the test suite includes the following:
In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. Here's one with a bullet. * criminey.
In the spec I give an extended argument that no blank line should be required. The argument is that a block of text should not change its meaning when placed in a list item. Since all Markdown implementations allow sublists to start without a preceding blank line, the
1. in the following example creates an ordered list:
- Foo 1. bar
So if we take the contents of this list item out of the list item,
Foo 1. bar
1. should still create an ordered list. This is the Principle of Uniformity. The spec for list items presupposes it, because it has the form: “suppose lines Ls make up blocks Bs; then if you put Ls into a list item, adding a list marker to the first line and indenting the rest appropriately, you get a list item with contents Bs.” That kind of spec won’t work if Ls has a different meaning inside a list item than outside.
I point out that reStructuredText requires a blank line before all lists, even when they occur as sublists – a different choice which also respects the Principle of Uniformity. But given that Markdown definitely does not require blank lines before sublists, Uniformity says it should not require blank lines before lists either.
I still think that’s a pretty compelling argument. But I’m having second thoughts, after writing a short memorial notice with lots of dates and constantly running up against this problem. It is awkward to have to escape periods after numerals that occur at the beginnings of lines. And if you use software to automatically hard-wrap your lines (fmt or par, for example), the problem is even worse. I figure John Gruber ran up against the same problem, which caused him to add the test case quoted above. Several people have brought up the issue on this forum, as well.
In addition, going a different way than the majority of current implementations has a steep cost; it means that some existing documents will render in ways that aren’t intended if interpreted as CommonMark.
All this is making me think that perhaps we should find a way to write the spec that requires blank lines between paragraphs and lists, except when the paragraphs are (direct?) children of a list item. Perhaps this can be done without entirely changing the form of the spec, by adding an additional condition – that a list cannot interrupt a paragraph unless that paragraph is the child of a list item, or something to that effect?
Does anyone have thoughts on this?