mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-03 19:41:31 +08:00
🐛 Unable to find-replace tag https://github.com/siyuan-note/siyuan/issues/14588
This commit is contained in:
parent
298a15943e
commit
a1a8e2d7f7
@ -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…
Reference in New Issue
Block a user