🎨 改进块引计数浮窗显示逻辑 https://github.com/siyuan-note/siyuan/issues/6853

This commit is contained in:
Liang Ding 2022-12-24 12:18:39 +08:00
parent 818d04a8b7
commit 3d682a115d
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -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
}
}
}
}