Indent wiki json pages

This commit is contained in:
Peter Stuifzand 2020-05-20 23:07:56 +02:00
parent b5de4173ab
commit 20003eda48

View File

@ -67,7 +67,7 @@ func (fp *FilePages) Save(p string, page Page, summary, author string) error {
return err
}
defer f.Close()
if page.Content[0] == '{' {
if page.Content[0] == '{' || page.Content[0] == '[' {
var buf bytes.Buffer
err = json.Indent(&buf, []byte(page.Content), "", " ")
if err != nil {