This commit is contained in:
yuin 2021-09-11 11:57:36 +09:00
parent 1306649a65
commit 4317d98509
2 changed files with 13 additions and 3 deletions

View file

@ -416,3 +416,12 @@ hello\x00world
//- - - - - - - - -//
<h1></h1>
//= = = = = = = = = = = = = = = = = = = = = = = =//
29: An empty list item cannot interrupt a paragraph
//- - - - - - - - -//
x
*
//- - - - - - - - -//
<p>x
*</p>
//= = = = = = = = = = = = = = = = = = = = = = = =//

View file

@ -1,10 +1,11 @@
package parser
import (
"strconv"
"github.com/yuin/goldmark/ast"
"github.com/yuin/goldmark/text"
"github.com/yuin/goldmark/util"
"strconv"
)
type listItemType int
@ -143,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[5]-match[4] <= 1 {
return nil, NoChildren
}
}