mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-03 14:32:34 +08:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
58c18f6413
@ -513,7 +513,7 @@ func normalizeTree(tree *parse.Tree) (yfmRootID, yfmTitle, yfmUpdated string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
id := n.IALAttr("id")
|
id := n.IALAttr("id")
|
||||||
if "" == id {
|
if "" == id && n.IsBlock() {
|
||||||
n.SetIALAttr("id", n.ID)
|
n.SetIALAttr("id", n.ID)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -741,11 +741,15 @@ func buildSpanFromNode(n *ast.Node, tree *parse.Tree, rootID, boxID, p string) (
|
|||||||
|
|
||||||
if ast.NodeInlineHTML == n.Type {
|
if ast.NodeInlineHTML == n.Type {
|
||||||
// 没有行级 HTML,只有块级 HTML,这里转换为块
|
// 没有行级 HTML,只有块级 HTML,这里转换为块
|
||||||
|
n.ID = ast.NewNodeID()
|
||||||
|
n.SetIALAttr("id", n.ID)
|
||||||
|
n.SetIALAttr("updated", n.ID[:14])
|
||||||
b, attrs := buildBlockFromNode(n, tree)
|
b, attrs := buildBlockFromNode(n, tree)
|
||||||
b.Type = ast.NodeHTMLBlock.String()
|
b.Type = ast.NodeHTMLBlock.String()
|
||||||
blocks = append(blocks, b)
|
blocks = append(blocks, b)
|
||||||
attributes = append(attributes, attrs...)
|
attributes = append(attributes, attrs...)
|
||||||
walkStatus = ast.WalkContinue
|
walkStatus = ast.WalkContinue
|
||||||
|
logging.LogWarnf("inline HTML [%s] is converted to HTML block ", n.Tokens)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user