Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get emoji list & aliases from data file instead of symlinks
Previously, emoji name & unicode aliases were determined by following symlinks among `images/emoji/*.png`. This led to nontrivial code for resolving these aliases, made it tricky for contributors to add new aliases and inspect existing ones, and didn't leave room for adding metadata to emojis such as tags or descriptions from the Unicode spec. Moreover, the aliases as symlinks led to duplication of image assets in users' applications, with `hocho.png` and `knife.png` representing the same emoji but being two separate images. Users were also unsure what to do with `unicode/{HEX-NAME}.png` files, which would end up among their images after running the `:emoji` task. This change removes the symlinks support and creates the list of emojis and their aliases in `emoji.json`. A single emoji is now represented with an Emoji::Character instance, which has the `image_filename` method to determine the path to the corresponding image instead of having to construct it manually.
- Loading branch information