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

This commit is contained in:
Liang Ding 2022-11-21 23:17:00 +08:00
parent fe4eff719c
commit a6f5b9a36e
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -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
}