summaryrefslogtreecommitdiffhomepage
path: root/helpers/emoji.go
diff options
context:
space:
mode:
Diffstat (limited to 'helpers/emoji.go')
-rw-r--r--helpers/emoji.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/helpers/emoji.go b/helpers/emoji.go
index 31cd29deb..a6786c005 100644
--- a/helpers/emoji.go
+++ b/helpers/emoji.go
@@ -30,6 +30,12 @@ var (
emojiMaxSize int
)
+// Emoji returns the emojy given a key, e.g. ":smile:", nil if not found.
+func Emoji(key string) []byte {
+ emojiInit.Do(initEmoji)
+ return emojis[key]
+}
+
// Emojify "emojifies" the input source.
// Note that the input byte slice will be modified if needed.
// See http://www.emoji-cheat-sheet.com/