Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Improve copy/cut/delete `Headings and Bottom Blocks` menu https://github.com/siyuan-note/siyuan/issues/15797

Danielb79f89d8a01b
diff --git a/kernel/model/block.go b/kernel/model/block.go
index 6f4ccf1554..9ebe50a330 100644
--- a/kernel/model/block.go
+++ b/kernel/model/block.go
@@ -741,7 +741,11 @@ func GetHeadingChildrenDOM(id string, removeFoldAttr bool) (ret string) {
return ast.WalkContinue
})
- child.SetIALAttr("parent-heading", id)
+ if removeFoldAttr {
+ child.RemoveIALAttr("parent-heading")
+ } else {
+ child.SetIALAttr("parent-heading", id)
+ }
}
if removeFoldAttr {