From e54caf232f50d782f4f5ec7307228ac9734c7550 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Sun, 25 Sep 2022 19:13:26 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E5=B8=A6=E5=AD=90=E7=BA=A7=E5=8D=87?= =?UTF-8?q?=E9=99=8D=E6=A0=87=E9=A2=98=E5=B1=82=E7=BA=A7=20https://github.?= =?UTF-8?q?com/siyuan-note/siyuan/issues/2860?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/blockial.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/model/blockial.go b/kernel/model/blockial.go index 34cbd7aff..af7a51ee4 100644 --- a/kernel/model/blockial.go +++ b/kernel/model/blockial.go @@ -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)