🐛 Find-replace incorrectly converts tags to text https://github.com/siyuan-note/siyuan/issues/15372

This commit is contained in:
Daniel 2025-07-29 20:45:47 +08:00
parent 4554182d87
commit 449b537104
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -970,7 +970,7 @@ func replaceNodeTextMarkTextContent(n *ast.Node, method int, keyword, escapedKey
if strings.HasPrefix(replacement, "#") && strings.HasSuffix(replacement, "#") {
replacement = strings.TrimPrefix(replacement, "#")
replacement = strings.TrimSuffix(replacement, "#")
} else {
} else if strings.Contains(n.TextMarkTextContent, keyword) || strings.Contains(n.TextMarkTextContent, escapedKey) {
// 将标签转换为纯文本
if "tag" == n.TextMarkType { // 没有其他类型,仅是标签时直接转换