An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: Support replacing inline tags with plain text https://github.com/siyuan-note/siyuan/issues/11238
Daniel1b98f43be75c
diff --git a/kernel/model/search.go b/kernel/model/search.goindex 9f4cd91f93..e48304dff3 100644--- a/kernel/model/search.go+++ b/kernel/model/search.go@@ -947,7 +947,13 @@ func replaceNodeTextMarkTextContent(n *ast.Node, method int, keyword, escapedKeyreplacement = strings.TrimSuffix(replacement, "#")} else { // 将标签转换为纯文本if "tag" == n.TextMarkType { // 没有其他类型,仅是标签时直接转换- n.InsertBefore(&ast.Node{Type: ast.NodeText, Tokens: []byte(n.TextMarkTextContent)})+ content := n.TextMarkTextContent+ if strings.Contains(content, escapedKey) {+ content = strings.ReplaceAll(content, escapedKey, replacement)+ } else if strings.Contains(content, keyword) {+ content = strings.ReplaceAll(content, keyword, replacement)+ }+ n.InsertBefore(&ast.Node{Type: ast.NodeText, Tokens: []byte(content)})n.TextMarkTextContent = ""return}