joypixels / emojione

[Archived] The world's largest independent emoji font. Maintained at https://github.com/joypixels/emoji-toolkit.
https://www.joypixels.com
Other
4.46k stars 535 forks source link

What should shortnameToUnicode(':heart:') return? #597

Open chrisdeeming opened 6 years ago

chrisdeeming commented 6 years ago

The demo here when you enter :heart: produces:

image

Whereas I'd expect it to produce (I modified the page source to get it to display correctly for example purposes):

image

I've tested on most browsers and OS' and it seems to be mostly all of them that produce the same output, leading me to the conclusion that the library itself is returning the wrong value.

Anyone experiencing a similar thing?

JoshyPHP commented 6 years ago

I'm going to sum it up because it's hard to understand what's going on based on screenshots.

chrisdeeming commented 6 years ago

Very well worded, @JoshyPHP.

I actually was thinking in a similar direction before I created this issue, but my eyes scanned the RuleSet definition for :heart and I read '2764-fe0f' in its array and thought it was that which was being returned in this conversion, but I see now it is actually '2764'.

So, spot on 👍

Unfortunately, it appears as though most of the heart ones may be outputting incorrectly.