mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-23 21:53:09 +02:00
Fix panic with debug.Dump with Page when running the server
This replaces the current implementation with `json.MarshalIndent` which doesn't produce the same output, but at least it doesn't crash. There's a bug in the upstream `litter` library. This can probably be fixed, but that needs to wait. I have tested `go-spew` which does not crash, but it is very data racy in this context. FIxes #12309
This commit is contained in:
@@ -36,7 +36,7 @@ func init() {
|
||||
[][2]string{
|
||||
{`{{ $m := newScratch }}
|
||||
{{ $m.Set "Hugo" "Rocks!" }}
|
||||
{{ $m.Values | debug.Dump | safeHTML }}`, "map[string]interface {}{\n \"Hugo\": \"Rocks!\",\n}"},
|
||||
{{ $m.Values | debug.Dump | safeHTML }}`, "{\n \"Hugo\": \"Rocks!\"\n}"},
|
||||
},
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user