This commit is contained in:
yuin 2024-10-12 19:17:05 +09:00
parent fe34ea5d96
commit fa88006eee
2 changed files with 16 additions and 1 deletions

View file

@ -794,3 +794,18 @@ text" /></p>
//- - - - - - - - -// //- - - - - - - - -//
<p><a href="b"><em>[a]</em></a></p> <p><a href="b"><em>[a]</em></a></p>
//= = = = = = = = = = = = = = = = = = = = = = = =// //= = = = = = = = = = = = = = = = = = = = = = = =//
64: Nested list under an empty list item
//- - - - - - - - -//
-
- foo
//- - - - - - - - -//
<ul>
<li>
<ul>
<li>foo</li>
</ul>
</li>
</ul>
//= = = = = = = = = = = = = = = = = = = = = = = =//

View file

@ -58,7 +58,7 @@ func (b *listItemParser) Continue(node ast.Node, reader text.Reader, pc Context)
} }
offset := lastOffset(node.Parent()) offset := lastOffset(node.Parent())
isEmpty := node.ChildCount() == 0 isEmpty := node.ChildCount() == 0 && pc.Get(emptyListItemWithBlankLines) != nil
indent, _ := util.IndentWidth(line, reader.LineOffset()) indent, _ := util.IndentWidth(line, reader.LineOffset())
if (isEmpty || indent < offset) && indent < 4 { if (isEmpty || indent < offset) && indent < 4 {
_, typ := matchesListItem(line, true) _, typ := matchesListItem(line, true)