Skip to content

Commit

Permalink
Empty list items cannot interrupt a paragraph.
Browse files Browse the repository at this point in the history
This removes an ambiguity between setext headers and
lists in cases like

    foo
    -
  • Loading branch information
jgm committed Jul 13, 2016
1 parent 84e88cb commit 02ae86a
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions spec.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3621,10 +3621,12 @@ An [ordered list marker](@)
is a sequence of 1--9 arabic digits (`0-9`), followed by either a
`.` character or a `)` character. (The reason for the length
limit is that with 10 digits we start seeing integer overflows
in some browsers.) Exception: In cases where ordered list markers
interrupt paragraphs---that is, when they occur on a line
that would otherwise count as [paragraph continuation
text]---only `1.` and `1)` are allowed.
in some browsers.) Exception: In cases where ordered list
markers interrupt paragraphs---that is, when they occur on a
line that would otherwise count as [paragraph continuation
text]---list markers must be followed by some content other than
spaces before the end of the line, and for ordered list markers,
only `1.` and `1)` are allowed.

The following rules define [list items]:

Expand Down Expand Up @@ -4207,6 +4209,20 @@ A list may start or end with an empty list item:
</ul>
````````````````````````````````

However, an empty list item cannot interrupt a paragraph:

```````````````````````````````` example
foo
*

foo
1.
.
<p>foo
*</p>
<p>foo
1.</p>
````````````````````````````````


4. **Indentation.** If a sequence of lines *Ls* constitutes a list item
Expand Down Expand Up @@ -6122,10 +6138,8 @@ A newline also counts as whitespace:
*foo bar
*
.
<p>*foo bar</p>
<ul>
<li></li>
</ul>
<p>*foo bar
*</p>
````````````````````````````````


Expand Down

0 comments on commit 02ae86a

Please sign in to comment.