mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🐛 Find-replace incorrectly converts tags to text https://github.com/siyuan-note/siyuan/issues/15372
This commit is contained in:
parent
4554182d87
commit
449b537104
1 changed files with 1 additions and 1 deletions
|
|
@ -970,7 +970,7 @@ func replaceNodeTextMarkTextContent(n *ast.Node, method int, keyword, escapedKey
|
||||||
if strings.HasPrefix(replacement, "#") && strings.HasSuffix(replacement, "#") {
|
if strings.HasPrefix(replacement, "#") && strings.HasSuffix(replacement, "#") {
|
||||||
replacement = strings.TrimPrefix(replacement, "#")
|
replacement = strings.TrimPrefix(replacement, "#")
|
||||||
replacement = strings.TrimSuffix(replacement, "#")
|
replacement = strings.TrimSuffix(replacement, "#")
|
||||||
} else {
|
} else if strings.Contains(n.TextMarkTextContent, keyword) || strings.Contains(n.TextMarkTextContent, escapedKey) {
|
||||||
// 将标签转换为纯文本
|
// 将标签转换为纯文本
|
||||||
|
|
||||||
if "tag" == n.TextMarkType { // 没有其他类型,仅是标签时直接转换
|
if "tag" == n.TextMarkType { // 没有其他类型,仅是标签时直接转换
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue