Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions bin/regenerate-unicode
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,15 @@ fetch('https://api.github.com/repos/github/gemoji/contents/db/emoji.json', {

gemoji.forEach(emoji => {
// filter emoji by iOS version https://developer.apple.com/support/app-store/
if (emoji.ios_version <= 12) {
emojis.push([emoji.emoji, emoji.aliases]);
if (emoji.ios_version <= 15) {
// For flag emojis like 🇷🇺 it's in gemoji as `ru` but has a tag for `russia`. Since we want
// folks to be able to type in either for it we should combine the emoji alias with any
// tags that might be present.
if (emoji.category === 'Flags') {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reason I'm doing this for flags specifically and not everything is because they use tags for things like "smile" and having multiple emojis map to :smile: would be problematic.

emojis.push([emoji.emoji, Array.from(new Set([...emoji.aliases, ...emoji.tags].filter(Boolean)))]);
} else {
emojis.push([emoji.emoji, emoji.aliases]);
}
}
});

Expand Down
Loading