mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
🎨 Improve parsing tree https://ld246.com/article/1722826829447
This commit is contained in:
parent
30115901bd
commit
86f574a216
1 changed files with 6 additions and 4 deletions
|
|
@ -113,10 +113,12 @@ func genTreeByJSON(node *ast.Node, tree *parse.Tree, idMap *map[string]bool, nee
|
|||
node.Children = nil
|
||||
}
|
||||
|
||||
if node.ID != node.IALAttr("id") {
|
||||
//某些情况下会导致 ID 和属性 id 不相同 https://ld246.com/article/1722826829447
|
||||
*needFix = true
|
||||
node.SetIALAttr("id", node.ID)
|
||||
if node.IsBlock() {
|
||||
if node.ID != node.IALAttr("id") {
|
||||
//某些情况下会导致 ID 和属性 id 不相同 https://ld246.com/article/1722826829447
|
||||
*needFix = true
|
||||
node.SetIALAttr("id", node.ID)
|
||||
}
|
||||
}
|
||||
|
||||
switch node.Type {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue