🎨 改进导入 Markdown 时 <img> 标签的处理 Fix https://github.com/siyuan-note/siyuan/issues/6480

This commit is contained in:
Liang Ding 2022-11-04 19:56:09 +08:00
parent df2d99f152
commit 8e8940c1b7
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

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