🎨 Database .json follows the doc tree single line save setting https://github.com/siyuan-note/siyuan/issues/10571

This commit is contained in:
Daniel 2024-03-11 21:31:29 +08:00
parent 8675b49daa
commit 7f82fc21af
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
7 changed files with 12 additions and 7 deletions

View file

@ -468,7 +468,12 @@ func SaveAttributeView(av *AttributeView) (err error) {
}
}
data, err := gulu.JSON.MarshalJSON(av)
var data []byte
if util.UseSingleLineSave {
data, err = gulu.JSON.MarshalJSON(av)
} else {
data, err = gulu.JSON.MarshalIndentJSON(av, "", "\t")
}
if nil != err {
logging.LogErrorf("marshal attribute view [%s] failed: %s", av.ID, err)
return