From 8934856d75b6d48310c6ffcb1bf0b25e4a4ec5be Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Wed, 20 Aug 2025 19:36:08 +0800 Subject: [PATCH] :art: Parse `` tags when pasting https://github.com/siyuan-note/siyuan/issues/15464 --- kernel/model/import.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kernel/model/import.go b/kernel/model/import.go index e00aac816..7ead15023 100644 --- a/kernel/model/import.go +++ b/kernel/model/import.go @@ -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 {