Skip to content

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

:bug: Unable to search replace hyperlink anchor text https://github.com/siyuan-note/siyuan/issues/10689

Daniel45df03aede68
diff --git a/kernel/model/search.go b/kernel/model/search.go
index 0fcd5f4845..698ea925c4 100644
--- a/kernel/model/search.go
+++ b/kernel/model/search.go
@@ -592,7 +592,7 @@ func FindReplace(keyword, replacement string, replaceTypes map[string]bool, ids
} else if n.IsTextMarkType("a") {
if replaceTypes["aText"] {
if 0 == method {
- if bytes.Contains(n.Tokens, []byte(keyword)) {
+ if strings.Contains(n.TextMarkTextContent, keyword) {
n.TextMarkTextContent = strings.ReplaceAll(n.TextMarkTextContent, keyword, replacement)
}
} else if 3 == method {