🐛 The super block below the folded heading contains headings of the same level and cannot be loaded Fix https://github.com/siyuan-note/siyuan/issues/9162

This commit is contained in:
Daniel 2023-09-11 22:36:20 +08:00
parent cf5fc407cf
commit ccc9bc6518
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -58,6 +58,24 @@ func MoveFoldHeading(updateNode, oldNode *ast.Node) {
}
func IsInFoldedHeading(node, currentHeading *ast.Node) bool {
if nil == node {
return false
}
if ast.NodeSuperBlock == node.Type {
// The super block below the folded heading contains headings of the same level and cannot be loaded https://github.com/siyuan-note/siyuan/issues/9162
if nil == currentHeading {
return false
}
sbChildHeading := SuperBlockHeading(node)
if nil != sbChildHeading {
if sbChildHeading.HeadingLevel <= currentHeading.HeadingLevel {
return false
}
}
}
heading := HeadingParent(node)
if nil == heading {
return false