mirror of
https://github.com/danog/blackfriday.git
synced 2024-11-26 20:14:43 +01:00
Merge pull request #310 from Ambrevar/v2FixWalkNoContainer
v2: Fix walk with non-container root nodes
This commit is contained in:
commit
2b483a8555
2
node.go
2
node.go
@ -309,7 +309,7 @@ func newNodeWalker(root *Node) *nodeWalker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (nw *nodeWalker) next() {
|
func (nw *nodeWalker) next() {
|
||||||
if !nw.entering && nw.current == nw.root {
|
if (!nw.current.isContainer() || !nw.entering) && nw.current == nw.root {
|
||||||
nw.current = nil
|
nw.current = nil
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user