Indent wiki json pages
This commit is contained in:
parent
b5de4173ab
commit
20003eda48
2
file.go
2
file.go
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user