hugo/tpl
Bjørn Erik Pedersen cafb784799 Add emoji support
This uses the Emoji map from https://github.com/kyokomi/emoji -- but with a custom replacement implementation.

The built-in are fine for most use cases, but in Hugo we do care about pure speed.

The benchmarks below are skewed in Hugo's direction as the source and result is a byte slice,
Kyokomi's implementation works best with strings.

Curious: The easy-to-use `strings.Replacer` is also plenty fast.

```
BenchmarkEmojiKyokomiFprint-4  	   20000	     86038 ns/op	   33960 B/op	     117 allocs/op
BenchmarkEmojiKyokomiSprint-4  	   20000	     83252 ns/op	   38232 B/op	     122 allocs/op
BenchmarkEmojiStringsReplacer-4	  100000	     21092 ns/op	   17248 B/op	      25 allocs/op
BenchmarkHugoEmoji-4           	  500000	      5728 ns/op	     624 B/op	      13 allocs/op
```

Fixes #1891
2016-03-11 15:51:37 -06:00
..
reflect_helpers.go Make where accept slice 2016-03-06 13:15:07 +01:00
template.go Add support for Go 1.6 block keyword in templates 2016-03-10 10:53:54 +01:00
template_embedded.go Allow picking a specific file out of a gist 2016-03-11 18:29:07 +01:00
template_funcs.go Add emoji support 2016-03-11 15:51:37 -06:00
template_funcs_test.go tpl: Add replaceRE function 2016-03-11 19:59:18 +01:00
template_resources.go tpl: Unexport the rest of the internal template funcs 2016-03-04 01:00:41 +01:00
template_resources_test.go tpl: Unexport the rest of the internal template funcs 2016-03-04 01:00:41 +01:00
template_test.go Add support for Go 1.6 block keyword in templates 2016-03-10 10:53:54 +01:00