tpl/transform: Add template func for TOML/JSON/YAML docs examples conversion
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 9 Feb 2018 08:21:46 +0000 (09:21 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 10 Feb 2018 11:36:31 +0000 (12:36 +0100)
commitd382502d6dfa1c066545e215ba83e2e0a9d2c8d7
tree66b88972782856043b1b1f6fb22cdf272cb3ddde
parent2e95ec6844bf65a25485bdc8e2638e45788f2dcf
tpl/transform: Add template func for TOML/JSON/YAML docs examples conversion

Usage:

```html
{{ "title = \"Hello World\"" | transform.Remarshal "json" | safeHTML }}
```

Fixes #4389
helpers/general.go
tpl/transform/init.go
tpl/transform/remarshal.go [new file with mode: 0644]
tpl/transform/remarshal_test.go [new file with mode: 0644]