This commit is contained in:
Daniel 2025-08-20 19:36:08 +08:00
parent 752457b888
commit 8934856d75
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -1382,6 +1382,14 @@ func htmlBlock2Inline(tree *parse.Tree) {
ial := &ast.Node{Type: ast.NodeKramdownSpanIAL, Tokens: parse.IAL2Tokens([][]string{{"style", style}})}
img.SetIALAttr("style", style)
img.InsertAfter(ial)
} else if height := domAttrValue(htmlImg, "height"); "" != height {
if util2.IsDigit(height) {
height += "px"
}
style := "height: " + height + ";"
ial := &ast.Node{Type: ast.NodeKramdownSpanIAL, Tokens: parse.IAL2Tokens([][]string{{"style", style}})}
img.SetIALAttr("style", style)
img.InsertAfter(ial)
}
if nil != n.Parent && ast.NodeText == n.Type {