From 3d682a115deb59bbabaae5190a246b07c4204032 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Sat, 24 Dec 2022 12:18:39 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=94=B9=E8=BF=9B=E5=9D=97=E5=BC=95?= =?UTF-8?q?=E8=AE=A1=E6=95=B0=E6=B5=AE=E7=AA=97=E6=98=BE=E7=A4=BA=E9=80=BB?= =?UTF-8?q?=E8=BE=91=20https://github.com/siyuan-note/siyuan/issues/6853?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/file.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kernel/model/file.go b/kernel/model/file.go index 19d693d12..0a17eb9db 100644 --- a/kernel/model/file.go +++ b/kernel/model/file.go @@ -479,7 +479,13 @@ func GetDoc(startID, endID, id string, index int, keyword string, mode int, size if isBacklink { // 引用计数浮窗请求,需要按照反链逻辑组装 https://github.com/siyuan-note/siyuan/issues/6853 if ast.NodeParagraph == node.Type { - node = node.Parent + if nil != node.Parent && ast.NodeListItem == node.Parent.Type { + node = node.Parent + } else { + if parent := treenode.HeadingParent(node); nil != parent { + node = parent + } + } } }