mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Support replacing inline tags with plain text https://github.com/siyuan-note/siyuan/issues/11238
This commit is contained in:
parent
1b98f43be7
commit
b66558059d
1 changed files with 3 additions and 1 deletions
|
|
@ -945,7 +945,9 @@ 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 "tag" == n.TextMarkType { // 没有其他类型,仅是标签时直接转换
|
||||
content := n.TextMarkTextContent
|
||||
if strings.Contains(content, escapedKey) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue