From 9d334fcb0a1ec2faec90e6a5ea33da8e5696b854 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Mon, 28 Oct 2024 22:25:31 +0800 Subject: [PATCH] :bug: The bookmark panel cannot display items https://github.com/siyuan-note/siyuan/issues/12959 --- kernel/model/render.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/model/render.go b/kernel/model/render.go index d58aed2ef98..565fa9bf5d7 100644 --- a/kernel/model/render.go +++ b/kernel/model/render.go @@ -86,9 +86,10 @@ func renderOutline(heading *ast.Node, luteEngine *lute.Lute) (ret string) { buf.WriteString(dom) return ast.WalkSkipChildren case ast.NodeImage: - // 标题后直接跟图片时图片的提示文本不再渲染到大纲中 https://github.com/siyuan-note/siyuan/issues/6278 - title := n.ChildByType(ast.NodeLinkTitle) - title.Unlink() + if title := n.ChildByType(ast.NodeLinkTitle); nil != title { + // 标题后直接跟图片时图片的提示文本不再渲染到大纲中 https://github.com/siyuan-note/siyuan/issues/6278 + title.Unlink() + } dom := luteEngine.RenderNodeBlockDOM(n) buf.WriteString(dom) return ast.WalkSkipChildren