Skip to content

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

:bug: Focus block does not add the title when exporting as an image https://github.com/siyuan-note/siyuan/issues/10177

Daniele0fb872cbf28
diff --git a/kernel/model/export.go b/kernel/model/export.go
index c0a821b091..492ff938d4 100644
--- a/kernel/model/export.go
+++ b/kernel/model/export.go
@@ -865,11 +865,13 @@ func prepareExportTree(bt *treenode.BlockTree) (ret *parse.Tree) {
}
}
+ oldRoot := ret.Root
ret = parse.Parse("", []byte(""), luteEngine.ParseOptions)
first := ret.Root.FirstChild
for _, node := range nodes {
first.InsertBefore(node)
}
+ ret.Root.KramdownIAL = oldRoot.KramdownIAL
}
ret.Path = bt.Path
ret.HPath = bt.HPath