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: Improve search for emojis in tags https://github.com/siyuan-note/siyuan/issues/15391
Daniel16d3b65b2a24
diff --git a/kernel/model/search.go b/kernel/model/search.goindex 6a86900c2f..e24c5ec296 100644--- a/kernel/model/search.go+++ b/kernel/model/search.go@@ -2213,9 +2213,12 @@ func getRefSearchIgnoreLines() (ret []string) {func filterQueryInvisibleChars(query string) string {query = strings.ReplaceAll(query, " ", "_@full_width_space@_")query = strings.ReplaceAll(query, "\t", "_@tab@_")+ query = strings.ReplaceAll(query, string(gulu.ZWJ), "__@ZWJ@__")query = util.RemoveInvalid(query)query = strings.ReplaceAll(query, "_@full_width_space@_", " ")query = strings.ReplaceAll(query, "_@tab@_", "\t")+ query = strings.ReplaceAll(query, "__@ZWJ@__", string(gulu.ZWJ))+ query = strings.ReplaceAll(query, string(gulu.ZWJ)+"#", "#")return query}diff --git a/kernel/sql/database.go b/kernel/sql/database.goindex e8458cf40e..2c859d19d9 100644--- a/kernel/sql/database.go+++ b/kernel/sql/database.go@@ -667,8 +667,9 @@ func buildSpanFromNode(n *ast.Node, tree *parse.Tree, rootID, boxID, p string) (returncase ast.NodeTextMark:typ := treenode.TypeAbbr(n.Type.String()) + " " + n.TextMarkType- text := n.Content()+ text := strings.TrimSuffix(n.Content(), string(gulu.ZWJ))markdown := treenode.ExportNodeStdMd(n, luteEngine)+ markdown = strings.ReplaceAll(markdown, string(gulu.ZWJ)+"#", "#")parentBlock := treenode.ParentBlock(n)span := &Span{ID: ast.NewNodeID(),@@ -873,6 +874,11 @@ func buildBlockFromNode(n *ast.Node, tree *parse.Tree) (block *Block, attributescontent = strings.ReplaceAll(content, editor.Zwsp, "")markdown = strings.ReplaceAll(markdown, editor.Zwsp, "")+ // 剔除标签结尾处的零宽连字符 Improve search for emojis in tags https://github.com/siyuan-note/siyuan/issues/15391+ fcontent = strings.ReplaceAll(fcontent, string(gulu.ZWJ)+"#", "#")+ content = strings.ReplaceAll(content, string(gulu.ZWJ)+"#", "#")+ markdown = strings.ReplaceAll(markdown, string(gulu.ZWJ)+"#", "#")+block = &Block{ID: n.ID,ParentID: parentID,