summaryrefslogtreecommitdiffstats
path: root/common/maps/scratch_test.go
AgeCommit message (Collapse)Author
2018-10-27common/collections: Allow a mix of slice types in append/Scratch.AddBjørn Erik Pedersen
The type handling in these was improved in Hugo 0.49, but this also meant that it was no longer possible to start out with a string slice and later append `Page` etc. to it. This commit makes sure that the old behaviour is now possible again by falling back to a `[]interface{}` as a last resort. Fixes #5361
2018-10-08common/maps: Improve append in ScratchBjørn Erik Pedersen
This commit consolidates the reflective collections handling in `.Scratch` vs the `tpl` package so they use the same code paths. This commit also adds support for a corner case where a typed slice is appended to a nil or empty `[]interface{}`. Fixes #5275
2018-07-06Add a newScratch template funcBjørn Erik Pedersen
Fixes #4685