gomarkdown / markdown

markdown parser and HTML renderer for Go
Other
1.37k stars 172 forks source link

blockquote inside list do not work #243

Open DenisDuev opened 2 years ago

DenisDuev commented 2 years ago

Same as: https://github.com/gomarkdown/markdown/issues/242, the difference is that the blockquote is inside list.

For example:

1. list
  > blockquote

Returns:

<ol>
<li>list
&gt; blockquote</li>
</ol>

Expected:

<ol>
<li>list</li>
</ol>
<blockquote>
<p>blockquote</p>
</blockquote>
miekg commented 2 years ago

a list in go-markdown needs a newline to tell the parser it has block level elements. Your list example doesn't have a newline, so the parser doesn't do that scan.

Can we always set ast.ListItemContainsBlock? Dunno