mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 16:58:49 +01:00
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
Add a link
Reference in a new issue