all repos — grayfriday @ 14a0c487b886d6ec301a6ae53e15e489e91cde8d

blackfriday fork with a few changes

Fix walk with non-container root nodes

When passed a non-container root node, the former algorithm would go on
walking down the rest of the tree beyond the root.

The former walk fix was supposed to do that but somehow the code
disappeared in the process.
Pierre Neidhardt ambrevar@gmail.com
Wed, 05 Oct 2016 09:43:05 +0530
commit

14a0c487b886d6ec301a6ae53e15e489e91cde8d

parent

6141d5fde123676abca66f4a2186175dfc1a5c50

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M node.gonode.go

@@ -309,7 +309,7 @@ }

} func (nw *nodeWalker) next() { - if !nw.entering && nw.current == nw.root { + if (!nw.current.isContainer() || !nw.entering) && nw.current == nw.root { nw.current = nil return }