zzarcon / gh-emoji

Github emoji parsing done right :point_up: :pray: :point_up_2: :clap: :ok_hand:
http://zzarcon.github.io/gh-emoji/
MIT License
160 stars 7 forks source link

The `:+1:` emoji is not recognized #15

Closed mislav closed 8 years ago

mislav commented 8 years ago

This is because the [\w\.]+ regex doesn't allow a literal + character.

I suggest the following regex: :([\w+-]+):

mislav commented 8 years ago

For the same reason, it's not safe to use the emoji ID to generate a classname like this gh-emoji-${id} because emojis can contain + and - characters.

rpunkfu commented 8 years ago

Thanks @mislav! :) I'm working on fix and tests for our new regex to avoid this type of bugs in future :) Regarding your second comment, I proposed that we move emojis names from class tag. :)

zzarcon commented 8 years ago

Fixed on v0.2.4, more info https://github.com/zzarcon/gh-emoji/pull/18. Thanks for the help @mislav ^^