This commit is contained in:
yuin 2021-10-17 17:46:05 +09:00
parent 05d89a0b45
commit e77ca9231a
2 changed files with 9 additions and 1 deletions

View file

@ -562,3 +562,11 @@ x
//- - - - - - - - -//
<p>[ <img src="x" alt=" b " /> ](y)</p>
//= = = = = = = = = = = = = = = = = = = = = = = =//
44: An empty list item(with trailing spaces) cannot interrupt a paragraph
//- - - - - - - - -//
a\n* \n
//- - - - - - - - -//
<p>a
*</p>
//= = = = = = = = = = = = = = = = = = = = = = = =//

View file

@ -144,7 +144,7 @@ func (b *listParser) Open(parent ast.Node, reader text.Reader, pc Context) (ast.
return nil, NoChildren
}
//an empty list item cannot interrupt a paragraph:
if match[5]-match[4] <= 1 {
if match[4] < 0 || util.IsBlank(line[match[4]:match[5]]) {
return nil, NoChildren
}
}