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

This commit is contained in:
Daniel 2024-03-22 19:28:59 +08:00
parent c752df919a
commit 45df03aede
No known key found for this signature in database
GPG Key ID: 86211BA83DF03017

View File

@ -592,7 +592,7 @@ func FindReplace(keyword, replacement string, replaceTypes map[string]bool, ids
} else if n.IsTextMarkType("a") { } else if n.IsTextMarkType("a") {
if replaceTypes["aText"] { if replaceTypes["aText"] {
if 0 == method { if 0 == method {
if bytes.Contains(n.Tokens, []byte(keyword)) { if strings.Contains(n.TextMarkTextContent, keyword) {
n.TextMarkTextContent = strings.ReplaceAll(n.TextMarkTextContent, keyword, replacement) n.TextMarkTextContent = strings.ReplaceAll(n.TextMarkTextContent, keyword, replacement)
} }
} else if 3 == method { } else if 3 == method {