🐛 Importing markdown files that include <kbd> freezes Fix https://github.com/siyuan-note/siyuan/issues/8611

This commit is contained in:
Daniel 2023-06-25 10:06:45 +08:00
parent de03cdb11c
commit 4a8f6df9e5
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 6 additions and 8 deletions

View file

@ -1046,7 +1046,10 @@ func convertTags(text string) (ret string) {
// buildBlockRefInText 将文本节点进行结构化处理。
func buildBlockRefInText() {
lute := NewLute()
lute.SetHTMLTag2TextMark(true)
for _, tree := range importTrees {
tree.MergeText()
var unlinkTextNodes []*ast.Node
ast.Walk(tree.Root, func(n *ast.Node, entering bool) ast.WalkStatus {
if !entering || ast.NodeText != n.Type {
@ -1089,8 +1092,3 @@ func searchLinkID(link string) (id string) {
}
return
}
func cleanImport() {
importTrees = []*parse.Tree{}
searchLinks = map[string]string{}
}