🎨 Improve find-replace of image/link elements https://github.com/siyuan-note/siyuan/issues/14049

This commit is contained in:
Daniel 2025-02-16 17:01:42 +08:00
parent c36b2a4fdc
commit dbbd250894
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -688,7 +688,12 @@ func FindReplace(keyword, replacement string, replaceTypes map[string]bool, ids
}
if "" == n.TextMarkAHref {
unlinks = append(unlinks, n)
if "" == n.TextMarkTextContent {
unlinks = append(unlinks, n)
} else {
n.Type = ast.NodeText
n.Tokens = []byte(n.TextMarkTextContent)
}
}
}
} else if n.IsTextMarkType("em") {