Skip to content

Commit

Permalink
Merge branch 'master' into emoji-13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
muan committed Jul 13, 2020
2 parents 2f96681 + 4e6dee1 commit 52c7688
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions script/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,6 @@ function slugify(str) {
//
const ORDERED_EMOJI_REGEX = /.+\s;\s(?<version>[0-9.]+)\s#\s(?<emoji>\S+)\s(?<name>[^:]+)(?::\s)?(?<desc>.+)?/

// Not sure why these are listed as `⊖gbeng`, `⊖gbsct`, `⊖gbwls`
const nameExceptions = {
'flag_gbeng': 'flag_england',
'flag_gbsct': 'flag_scotland',
'flag_gbwls': 'flag_wales'
}

let currentEmoji = null

orderedEmojiData.split('\n').forEach(line => {
Expand All @@ -93,7 +86,7 @@ orderedEmojiData.split('\n').forEach(line => {
const {groups: {version, emoji, name, desc}} = match
const isSkinToneVariation = desc && !!desc.match(SKIN_TONE_VARIATION_DESC)
const transformedName = slugify(desc && !isSkinToneVariation ? [name, desc].join(' ') : name)
const finalName = nameExceptions[transformedName] || transformedName
const finalName = transformedName
if (isSkinToneVariation) {
dataByEmoji[currentEmoji].skin_tone_support = true
dataByEmoji[currentEmoji].skin_tone_support_unicode_version = version
Expand Down

0 comments on commit 52c7688

Please sign in to comment.