mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
🐛 Importing markdown files that include <kbd> freezes Fix https://github.com/siyuan-note/siyuan/issues/8611
This commit is contained in:
parent
de03cdb11c
commit
4a8f6df9e5
3 changed files with 6 additions and 8 deletions
|
|
@ -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{}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue