From dcc5cefa6401e8d9a2bd10313a7b3dbce389968b Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Tue, 5 Nov 2024 09:36:11 +0800 Subject: [PATCH] :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 --- kernel/model/import.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/model/import.go b/kernel/model/import.go index d6009cb2d..2b65d2426 100644 --- a/kernel/model/import.go +++ b/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)) }