Browse Source

: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 months ago
parent
commit
dcc5cefa64
1 changed files with 2 additions and 0 deletions
  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))
 		}