mirror of
https://github.com/yuin/goldmark
synced 2025-03-04 23:04:52 +00:00
Fix #245 - 7
This commit is contained in:
parent
1306649a65
commit
4317d98509
2 changed files with 13 additions and 3 deletions
|
|
@ -416,3 +416,12 @@ hello\x00world
|
||||||
//- - - - - - - - -//
|
//- - - - - - - - -//
|
||||||
<h1></h1>
|
<h1></h1>
|
||||||
//= = = = = = = = = = = = = = = = = = = = = = = =//
|
//= = = = = = = = = = = = = = = = = = = = = = = =//
|
||||||
|
|
||||||
|
29: An empty list item cannot interrupt a paragraph
|
||||||
|
//- - - - - - - - -//
|
||||||
|
x
|
||||||
|
*
|
||||||
|
//- - - - - - - - -//
|
||||||
|
<p>x
|
||||||
|
*</p>
|
||||||
|
//= = = = = = = = = = = = = = = = = = = = = = = =//
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
package parser
|
package parser
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strconv"
|
||||||
|
|
||||||
"github.com/yuin/goldmark/ast"
|
"github.com/yuin/goldmark/ast"
|
||||||
"github.com/yuin/goldmark/text"
|
"github.com/yuin/goldmark/text"
|
||||||
"github.com/yuin/goldmark/util"
|
"github.com/yuin/goldmark/util"
|
||||||
"strconv"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type listItemType int
|
type listItemType int
|
||||||
|
|
@ -143,7 +144,7 @@ func (b *listParser) Open(parent ast.Node, reader text.Reader, pc Context) (ast.
|
||||||
return nil, NoChildren
|
return nil, NoChildren
|
||||||
}
|
}
|
||||||
//an empty list item cannot interrupt a paragraph:
|
//an empty list item cannot interrupt a paragraph:
|
||||||
if match[5]-match[4] == 1 {
|
if match[5]-match[4] <= 1 {
|
||||||
return nil, NoChildren
|
return nil, NoChildren
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue