🎨 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:38:33 +08:00
parent 7145460c18
commit 8ad15c4d23
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 14 additions and 7 deletions

View file

@ -80,7 +80,12 @@ func renderTemplate(c *gin.Context) {
return
}
content, err := model.RenderTemplate(p, id)
preview := false
if previewArg := arg["preview"]; nil != previewArg {
preview = previewArg.(bool)
}
content, err := model.RenderTemplate(p, id, preview)
if nil != err {
ret.Code = -1
ret.Msg = util.EscapeHTML(err.Error())