Skip to content

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

:art: Improve find replace https://github.com/siyuan-note/siyuan/issues/8771

Daniel58ffe8a3b574
diff --git a/kernel/model/search.go b/kernel/model/search.go
index 4816686266..88f75057a8 100644
--- a/kernel/model/search.go
+++ b/kernel/model/search.go
@@ -215,6 +215,9 @@ func FindReplace(keyword, replacement string, ids []string, paths, boxes []strin
return
}
+ keyword = strings.TrimSpace(keyword)
+ replacement = strings.TrimSpace(replacement)
+
if keyword == replacement {
return
}