I wrote a gem. It’s called
EmojiSub (the similarity to
gsub is intentional).
It’s a very simple script that takes a text string and does a global substitution of any emoji shortcodes (a la Slack, Github, etc) and replaces them with the actual HTML entity code for the emoji.
In the process, I’ve had to learn a lot about Emoji, unicode, and how they work, it’s been a surprising topic that’s far deeper than I anticipated!
I’ll write more about the gem a bit later, once it’s more stable. There’s been a lot of steps involved in this whole process that I’ll talk about too.