Closed finsprings closed 12 years ago
The result of @gruber's Markdown.pl for that document is invalid HTML:
<p><ol>
<li>Hello</li>
<li>World</p>
<blockquote>
<p>A blockquote in a list item.</li>
</ol></p>
</blockquote>
Which makes sense, because as the Markdown syntax document clearly states:
To put a blockquote within a list item, the blockquote’s > delimiters need to be indented:
* A list item with a blockquote:
> This is a blockquote
> inside a list item.
Consequently, this is not a bug but very sane behavior from Sundown. Cheers for reporting, though.
Thanks.
The confusion I see from many users of my app is that sundown requires blank lines between things that other parsers seemingly do not.
For example this works:
* A list item with a blockquote: > This is a blockquote > inside a list item.
is rendered as:
A list item with a blockquote:
This is a blockquote inside a list item.
but this:
* A list item with a blockquote: > This is a blockquote > inside a list item.
is rendered as:
This is a blockquote inside a list item.
Is that a peculiarity of its implementation or is that a requirement of Markdown's syntax description?
Markdown's syntax document doesn't say anything about blank lines, but plugging your example into the Markdown dingus:
* A list item with a blockquote:
> This is a blockquote
> inside a list item.
results in the same invalid HTML as not indenting the delimiters:
<p><ul>
<li>A list item with a blockquote:</p>
<blockquote>
<p>This is a blockquote
inside a list item.</li>
</ul></p>
</blockquote>
The blockquote in the list below is not parsed: the ">" is rendered when it should not be. @gruber's Markdown.pl does render it as a blockquote.
Tested at a40cdb9ece259d35aa4b3f8bb7efdcac9bb82109.