fix(url_tree): incorrect tree structure

pull/3989/head
Andy Hsu 2023-03-24 20:34:03 +08:00
parent 663814c9ef
commit 48dc3552a6
1 changed files with 1 additions and 1 deletions

View File

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