Skip to content

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

:art: Improve export preview mode https://github.com/siyuan-note/siyuan/issues/11981

Daniel14512aab7cac
diff --git a/kernel/model/outline.go b/kernel/model/outline.go
index ead94e5a10..8ad58c6b9d 100644
--- a/kernel/model/outline.go
+++ b/kernel/model/outline.go
@@ -231,7 +231,7 @@ func Outline(rootID string, preview bool) (ret []*Path, err error) {
title.InsertAfter(&ast.Node{Type: ast.NodeKramdownBlockIAL, Tokens: parse.IAL2Tokens(title.KramdownIAL)})
content := html.UnescapeString(root.Content)
- title.AppendChild(&ast.Node{Type: ast.NodeText, Tokens: []byte(content)})
+ title.AppendChild(&ast.Node{ID: root.ID, Type: ast.NodeText, Tokens: []byte(content)})
tree.Root.PrependChild(title)
}
}