浏览代码

:art: Improve parsing of YAML Front Matter when importing Markdown https://github.com/siyuan-note/siyuan/issues/12962 https://github.com/siyuan-note/siyuan/issues/13038

Daniel 8 月之前
父节点
当前提交
dcc5cefa64
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      kernel/model/import.go

+ 2 - 0
kernel/model/import.go

@@ -1181,6 +1181,8 @@ func reassignIDUpdated(tree *parse.Tree, rootID, updated string) {
 		n.SetIALAttr("id", n.ID)
 		if "" != updated {
 			n.SetIALAttr("updated", updated)
+			n.ID = updated + "-" + gulu.Rand.String(7)
+			n.SetIALAttr("id", n.ID)
 		} else {
 			n.SetIALAttr("updated", util.TimeFromID(n.ID))
 		}