This commit is contained in:
parent
5bc259b098
commit
e54caf232f
1 changed files with 3 additions and 2 deletions
|
@ -55,8 +55,9 @@ func GetHeadingLevelTransaction(id string, level int) (transaction *Transaction,
|
|||
}
|
||||
|
||||
diff := level - hLevel
|
||||
children := treenode.HeadingChildren(node)
|
||||
var childrenHeadings []*ast.Node
|
||||
var children, childrenHeadings []*ast.Node
|
||||
children = append(children, node)
|
||||
children = append(children, treenode.HeadingChildren(node)...)
|
||||
for _, c := range children {
|
||||
if ast.NodeHeading == c.Type {
|
||||
childrenHeadings = append(childrenHeadings, c)
|
||||
|
|
Loading…
Add table
Reference in a new issue