An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: Exporting embedded heading blocks without blocks underneath Fix https://github.com/siyuan-note/siyuan/issues/12075
Danielcfdec8fcda7a
diff --git a/kernel/model/render.go b/kernel/model/render.goindex 34ce0b756e..e864534b1a 100644--- a/kernel/model/render.go+++ b/kernel/model/render.go@@ -201,7 +201,20 @@ func resolveEmbedR(n *ast.Node, blockEmbedMode int, luteEngine *lute.Lute, resolif "d" == sqlBlock.Type {subTree, _ := LoadTreeByBlockID(sqlBlock.ID)md, _ = lute.FormatNodeSync(subTree.Root, luteEngine.ParseOptions, luteEngine.RenderOptions)- } // 标题块不需要再单独解析,直接使用 Markdown,函数开头处会处理+ } else if "h" == sqlBlock.Type {+ subTree, _ := LoadTreeByBlockID(sqlBlock.ID)+ h := treenode.GetNodeInTree(subTree, sqlBlock.ID)+ var hChildren []*ast.Node+ hChildren = append(hChildren, h)+ hChildren = append(hChildren, treenode.HeadingChildren(h)...)+ mdBuf := &bytes.Buffer{}+ for _, hChild := range hChildren {+ md, _ = lute.FormatNodeSync(hChild, luteEngine.ParseOptions, luteEngine.RenderOptions)+ mdBuf.WriteString(md)+ mdBuf.WriteString("\n\n")+ }+ md = mdBuf.String()+ }buf := &bytes.Buffer{}lines := strings.Split(md, "\n")