🎨 Blocks below other non-folded headings are no longer moved when moving a folded heading Fix https://github.com/siyuan-note/siyuan/issues/8321

This commit is contained in:
Daniel 2023-05-22 11:06:28 +08:00
parent cc9dce106a
commit feb4d7e0cd
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 14 additions and 0 deletions

View file

@ -72,6 +72,15 @@ func IsInFoldedHeading(node, currentHeading *ast.Node) bool {
return IsInFoldedHeading(heading, currentHeading)
}
func GetHeadingFold(nodes []*ast.Node) (ret []*ast.Node) {
for _, n := range nodes {
if "1" == n.IALAttr("heading-fold") {
ret = append(ret, n)
}
}
return
}
func HeadingChildren(heading *ast.Node) (ret []*ast.Node) {
start := heading.Next
if nil == start {