mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 15:40:12 +01:00
🐛 Unable to find-replace tag https://github.com/siyuan-note/siyuan/issues/14588
This commit is contained in:
parent
298a15943e
commit
a1a8e2d7f7
1 changed files with 4 additions and 0 deletions
|
|
@ -940,6 +940,10 @@ func replaceNodeTextMarkTextContent(n *ast.Node, method int, keyword, escapedKey
|
||||||
if "tag" == typ {
|
if "tag" == typ {
|
||||||
keyword = strings.TrimPrefix(keyword, "#")
|
keyword = strings.TrimPrefix(keyword, "#")
|
||||||
keyword = strings.TrimSuffix(keyword, "#")
|
keyword = strings.TrimSuffix(keyword, "#")
|
||||||
|
escapedKey = strings.TrimPrefix(replacement, "#")
|
||||||
|
escapedKey = strings.TrimSuffix(replacement, "#")
|
||||||
|
replacement = strings.TrimPrefix(replacement, "#")
|
||||||
|
replacement = strings.TrimSuffix(replacement, "#")
|
||||||
}
|
}
|
||||||
|
|
||||||
if strings.Contains(n.TextMarkTextContent, escapedKey) {
|
if strings.Contains(n.TextMarkTextContent, escapedKey) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue