summaryrefslogtreecommitdiffstats
path: root/helpers/emoji_test.go
AgeCommit message (Collapse)Author
2023-10-24markdown: Pass emoji codes to yuin/goldmark-emojiJoe Mooring
Removes emoji code conversion from the page and shortcode parsers. Emoji codes in markdown are now passed to Goldmark, where the goldmark-emoji extension converts them to decimal numeric character references. This disables emoji rendering for the alternate content formats: html, asciidoc, org, pandoc, and rst. Fixes #7332 Fixes #11587 Closes #11598
2023-06-19all: Fix typos in function names and commentsOleksandr Redko
2020-12-30Update emoji import paths and versionCameron Moore
Since emoji is v2, we must import it with the `/v2` suffix. Doing so allows the Go tools to detect the latest release.
2020-12-03all: Format code with gofumptBjørn Erik Pedersen
See https://github.com/mvdan/gofumpt
2019-03-24all: Apply staticcheck recommendationsBjørn Erik Pedersen
2017-06-13Run gofmt to get imports in line vs gohugoio/hugoBjørn Erik Pedersen
2017-06-13all: Update import paths to gohugoio/hugoBjørn Erik Pedersen
2016-08-30helpers: Fix bug in emoji rendererCameron Moore
Fixes #2391
2016-07-01Fix Emoji benchmarkBjørn Erik Pedersen
The Emoji implementations gives slightly different output. One of them pads with a space.
2016-07-01Add Emoji test caseBjørn Erik Pedersen
See #2246
2016-06-11Fix Emojfy for certain text patternsBjørn Erik Pedersen
Fixes #2198
2016-05-09Don't add any space around EmojisBjørn Erik Pedersen
2016-03-24helpers: Apply GoLint rulesdigitalcraftsman
2016-03-11Add emoji supportBjørn Erik Pedersen
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