From a6f5b9a36e16cea584133c8dbf584d96c8049c2d Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Mon, 21 Nov 2022 23:17:00 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E4=BD=BF=E7=94=A8=20API=20`/api/block/?= =?UTF-8?q?getBlockKramdown`=20=E6=9F=A5=E8=AF=A2=E6=97=B6=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=20IAL=20Fix=20https://github.com/siyuan-note/siyuan/i?= =?UTF-8?q?ssues/6670?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/block.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/model/block.go b/kernel/model/block.go index f1826fd32..95ad07584 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 }