1
0
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:
Vytautas Šaltenis 2016-10-08 18:24:09 +03:00 committed by GitHub
commit 2b483a8555

View File

@ -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
} }