🎨 Improve find-replace of text containing escape characters https://github.com/siyuan-note/siyuan/issues/14173

This commit is contained in:
Daniel 2025-02-23 17:11:05 +08:00
parent 060eb0fd61
commit f99025d468
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -588,7 +588,11 @@ func FindReplace(keyword, replacement string, replaceTypes map[string]bool, ids
}
if replaceTextNode(n, method, keyword, replacement, r, luteEngine) {
unlinks = append(unlinks, n)
if nil != n.Parent && ast.NodeBackslash == n.Parent.Type {
unlinks = append(unlinks, n.Parent)
} else {
unlinks = append(unlinks, n)
}
}
case ast.NodeLinkDest:
if !replaceTypes["imgSrc"] {