In the description of setext headings (section 4.3), the specification states:
A setext heading underline is a sequence of “
=” characters or a sequence of “
-” characters, with no more than 3 spaces indentation and any number of trailing spaces. If a line containing a single “
-” can be interpreted as an empty list items, it should be interpreted this way and not as a setext heading underline.
In this example:
the condition written in the second sentence seems to apply: The line below “
Dolor” contains a single “
-” HYPHEN-MINUS character, and it can be interpreted as “an empty list items” [is that “an empty list item”?]
Thus the expected result seems to be that in the example the second line is not a setext heading underline, and thus the example is not a setext heading.
In this example the situation is similar, but less ambiguous:
The line below “
Dolor” here is (and must be) “interpreted as an empty list item”.
The reference implementation translates the first example to
but the second to
<p>Dolor<p> <ol> <li></li> </ol>
Is this a bug in the reference implementation? Do I misread the specification? Is the specification wrong?