mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
f515eae955
commit
2baa476b51
1 changed files with 10 additions and 3 deletions
|
|
@ -787,9 +787,16 @@ func GetBlockDOMs(ids []string) (ret map[string]string) {
|
|||
continue
|
||||
}
|
||||
|
||||
if parentFoldedHeading := treenode.GetParentFoldedHeading(node); nil != parentFoldedHeading {
|
||||
node.SetIALAttr("parent-heading", parentFoldedHeading.ID)
|
||||
}
|
||||
ast.Walk(node, func(n *ast.Node, entering bool) ast.WalkStatus {
|
||||
if !entering || !n.IsBlock() {
|
||||
return ast.WalkContinue
|
||||
}
|
||||
|
||||
if parentFoldedHeading := treenode.GetParentFoldedHeading(n); nil != parentFoldedHeading {
|
||||
n.SetIALAttr("parent-heading", parentFoldedHeading.ID)
|
||||
}
|
||||
return ast.WalkContinue
|
||||
})
|
||||
|
||||
ret[id] = luteEngine.RenderNodeBlockDOM(node)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue