mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 08:30:12 +01:00
🐛 超级块下方块面包屑计算不正确 Fix https://github.com/siyuan-note/siyuan/issues/6675
This commit is contained in:
parent
5afffdb0f7
commit
ba6f0e2067
2 changed files with 20 additions and 6 deletions
|
|
@ -117,6 +117,14 @@ func SuperBlockHeading(sb *ast.Node) *ast.Node {
|
|||
return nil
|
||||
}
|
||||
|
||||
func SuperBlockLastHeading(sb *ast.Node) *ast.Node {
|
||||
headings := sb.ChildrenByType(ast.NodeHeading)
|
||||
if 0 < len(headings) {
|
||||
return headings[len(headings)-1]
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func HeadingParent(node *ast.Node) *ast.Node {
|
||||
if nil == node {
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue