fix(url_tree): incorrect tree structure
This commit is contained in:
parent
663814c9ef
commit
48dc3552a6
@ -59,7 +59,7 @@ func BuildTree(text string, headSize bool) (*Node, error) {
|
|||||||
}
|
}
|
||||||
// if level isn't greater than the level of the top of the stack
|
// if level isn't greater than the level of the top of the stack
|
||||||
// it is not the child of the top of the stack
|
// it is not the child of the top of the stack
|
||||||
if level <= stack[len(stack)-1].Level {
|
for level <= stack[len(stack)-1].Level {
|
||||||
// pop the top of the stack
|
// pop the top of the stack
|
||||||
stack = stack[:len(stack)-1]
|
stack = stack[:len(stack)-1]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user