Skip to content

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

:art: 使用 API `/api/block/getBlockKramdown` 查询时返回 IAL Fix https://github.com/siyuan-note/siyuan/issues/6670

Liang Dinga6f5b9a36e16
diff --git a/kernel/model/block.go b/kernel/model/block.go
index f1826fd327..95ad075848 100644
--- a/kernel/model/block.go
+++ b/kernel/model/block.go
@@ -371,8 +371,11 @@ func GetBlockKramdown(id string) (ret string) {
addBlockIALNodes(tree, false)
node := treenode.GetNodeInTree(tree, id)
+ root := &ast.Node{Type: ast.NodeDocument}
+ root.AppendChild(node.Next) // IAL
+ root.PrependChild(node)
luteEngine := NewLute()
- ret = treenode.ExportNodeStdMd(node, luteEngine)
+ ret = treenode.ExportNodeStdMd(root, luteEngine)
return
}