From a92cef6ddeea00edf51068e1e073bb4afc03bf0e Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Wed, 12 Oct 2022 09:20: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=E7=BA=A7=E6=A0=87=E9=A2=98=E5=B1=82=E7=BA=A7=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=88=97=E8=A1=A8=E5=9D=97=E4=B8=AD=E7=9A=84=E6=A0=87?= =?UTF-8?q?=E9=A2=98=20Fix=20https://github.com/siyuan-note/siyuan/issues/?= =?UTF-8?q?6157?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/block.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/model/block.go b/kernel/model/block.go index 9a85e6a8e..10f15d495 100644 --- a/kernel/model/block.go +++ b/kernel/model/block.go @@ -296,9 +296,8 @@ func GetHeadingLevelTransaction(id string, level int) (transaction *Transaction, children = append(children, node) children = append(children, treenode.HeadingChildren(node)...) for _, c := range children { - if ast.NodeHeading == c.Type { - childrenHeadings = append(childrenHeadings, c) - } + ccH := c.ChildrenByType(ast.NodeHeading) + childrenHeadings = append(childrenHeadings, ccH...) } transaction = &Transaction{}