mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-30 05:18:49 +01:00
This commit is contained in:
parent
db8ca05b27
commit
edfb645f3a
2 changed files with 3 additions and 2 deletions
|
|
@ -166,8 +166,10 @@ func FindReplace(keyword, replacement string, ids []string) (err error) {
|
|||
n.Tokens = bytes.ReplaceAll(n.Tokens, []byte(keyword), []byte(replacement))
|
||||
}
|
||||
case ast.NodeTextMark:
|
||||
if strings.Contains(n.TextMarkTextContent, keyword) {
|
||||
if strings.Contains(n.TextMarkTextContent, keyword) || strings.Contains(n.TextMarkInlineMathContent, keyword) || strings.Contains(n.TextMarkInlineMemoContent, keyword) {
|
||||
n.TextMarkTextContent = strings.ReplaceAll(n.TextMarkTextContent, keyword, replacement)
|
||||
n.TextMarkInlineMathContent = strings.ReplaceAll(n.TextMarkInlineMathContent, keyword, replacement)
|
||||
n.TextMarkInlineMemoContent = strings.ReplaceAll(n.TextMarkInlineMemoContent, keyword, replacement)
|
||||
}
|
||||
}
|
||||
return ast.WalkContinue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue