Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Improve backmention search https://github.com/siyuan-note/siyuan/issues/4699

Daniel76e4aad5849d
diff --git a/kernel/model/backlink.go b/kernel/model/backlink.go
index 7ec0117907..ef68afd7c0 100644
--- a/kernel/model/backlink.go
+++ b/kernel/model/backlink.go
@@ -862,7 +862,7 @@ func searchBackmention(mentionKeywords []string, keyword string, excludeBacklink
if !entering || n.IsBlock() {
return ast.WalkContinue
}
- if ast.NodeText == n.Type { // 这里包含了标签命中的情况,因为 Lute 没有启用 TextMark
+ if ast.NodeText == n.Type /* NodeText 包含了标签命中的情况 */ || ast.NodeLinkText == n.Type {
textBuf.Write(n.Tokens)
}
return ast.WalkContinue