Skip to content

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

:art: 带子级升降级标题层级支持列表块中的标题 Fix https://github.com/siyuan-note/siyuan/issues/6157

Liang Dinga92cef6ddeea
diff --git a/kernel/model/block.go b/kernel/model/block.go
index 9a85e6a8e4..10f15d495f 100644
--- a/kernel/model/block.go
+++ b/kernel/model/block.go
@@ -296,9 +296,8 @@ func GetHeadingLevelTransaction(id string, level int) (transaction *Transaction,
children = append(children, node)
children = append(children, treenode.HeadingChildren(node)...)
for _, c := range children {
- if ast.NodeHeading == c.Type {
- childrenHeadings = append(childrenHeadings, c)
- }
+ ccH := c.ChildrenByType(ast.NodeHeading)
+ childrenHeadings = append(childrenHeadings, ccH...)
}
transaction = &Transaction{}