From 8e8940c1b798dc9eb29a26c6d24fb3eb244479b7 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Fri, 4 Nov 2022 19:56:09 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=94=B9=E8=BF=9B=E5=AF=BC=E5=85=A5=20?= =?UTF-8?q?Markdown=20=E6=97=B6=20``=20=E6=A0=87=E7=AD=BE=E7=9A=84?= =?UTF-8?q?=E5=A4=84=E7=90=86=20Fix=20https://github.com/siyuan-note/siyua?= =?UTF-8?q?n/issues/6480?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/import.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/kernel/model/import.go b/kernel/model/import.go index 2154d2c91..279d39701 100644 --- a/kernel/model/import.go +++ b/kernel/model/import.go @@ -657,8 +657,12 @@ func imgHtmlBlock2InlineImg(tree *parse.Tree) { if 1 > len(htmlNodes) { return ast.WalkContinue } - if atom.Img == htmlNodes[0].DataAtom { - imgHtmlBlocks[n] = htmlNodes[0] + + for _, htmlNode := range htmlNodes { + if atom.Img == htmlNode.DataAtom { + imgHtmlBlocks[n] = htmlNode + break + } } } return ast.WalkContinue