🎨 Shallow clone the corresponding database when the template contains database blocks https://github.com/siyuan-note/siyuan/issues/9494

This commit is contained in:
Daniel 2023-10-24 09:56:04 +08:00
parent 5e3aefa793
commit 8a789a8573
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -251,6 +251,7 @@ func renderTemplate(p, id string, preview bool) (string, error) {
// 重新生成 ID
n.ID = ast.NewNodeID()
n.SetIALAttr("id", n.ID)
n.RemoveIALAttr(av.NodeAttrNameAvs)
// Blocks created via template update time earlier than creation time https://github.com/siyuan-note/siyuan/issues/8607
refreshUpdated(n)