mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-04 15:58:49 +01:00
🐛 When the heading block and super block are used together, repeating content if unfolding the heading https://github.com/siyuan-note/siyuan/issues/9435
This commit is contained in:
parent
166dd4a1c3
commit
4a832e89f8
2 changed files with 36 additions and 2 deletions
|
|
@ -46,7 +46,7 @@ func (tx *Transaction) doFoldHeading(operation *Operation) (ret *TxErr) {
|
|||
return &TxErr{code: TxErrCodeBlockNotFound, id: headingID}
|
||||
}
|
||||
|
||||
children := treenode.HeadingChildren(heading)
|
||||
children := treenode.HeadingChildren4Folding(heading)
|
||||
for _, child := range children {
|
||||
childrenIDs = append(childrenIDs, child.ID)
|
||||
child.SetIALAttr("fold", "1")
|
||||
|
|
@ -80,7 +80,7 @@ func (tx *Transaction) doUnfoldHeading(operation *Operation) (ret *TxErr) {
|
|||
return &TxErr{code: TxErrCodeBlockNotFound, id: headingID}
|
||||
}
|
||||
|
||||
children := treenode.HeadingChildren(heading)
|
||||
children := treenode.HeadingChildren4Folding(heading)
|
||||
for _, child := range children {
|
||||
child.RemoveIALAttr("heading-fold")
|
||||
child.RemoveIALAttr("fold")
|
||||
|
|
@ -98,6 +98,7 @@ func (tx *Transaction) doUnfoldHeading(operation *Operation) (ret *TxErr) {
|
|||
}
|
||||
sql.UpsertTreeQueue(tree)
|
||||
|
||||
children = treenode.HeadingChildren(heading)
|
||||
luteEngine := NewLute()
|
||||
operation.RetData = renderBlockDOMByNodes(children, luteEngine)
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue