unqualified fixes
This commit is contained in:
parent
b1f5902397
commit
13e76b8022
|
@ -13,6 +13,30 @@ interface UnicodeMap {
|
|||
}
|
||||
}
|
||||
|
||||
const blacklist = {
|
||||
'1f441-fe0f-200d-1f5e8-fe0f': true,
|
||||
};
|
||||
|
||||
const tweaks = {
|
||||
'👁🗨️': ['1f441-200d-1f5e8', 'eye-in-speech-bubble'],
|
||||
'#⃣': ['23-20e3', 'hash'],
|
||||
'*⃣': ['2a-20e3', 'keycap_star'],
|
||||
'0⃣': ['30-20e3', 'zero'],
|
||||
'1⃣': ['31-20e3', 'one'],
|
||||
'2⃣': ['32-20e3', 'two'],
|
||||
'3⃣': ['33-20e3', 'three'],
|
||||
'4⃣': ['34-20e3', 'four'],
|
||||
'5⃣': ['35-20e3', 'five'],
|
||||
'6⃣': ['36-20e3', 'six'],
|
||||
'7⃣': ['37-20e3', 'seven'],
|
||||
'8⃣': ['38-20e3', 'eight'],
|
||||
'9⃣': ['39-20e3', 'nine'],
|
||||
'🏳🌈': ['1f3f3-fe0f-200d-1f308', 'rainbow-flag'],
|
||||
'🏳⚧️': ['1f3f3-fe0f-200d-26a7-fe0f', 'transgender_flag'],
|
||||
// '🏳️⚧️': ['1f3f3-fe0f-200d-26a7-fe0f'],
|
||||
'🏳⚧': ['1f3f3-fe0f-200d-26a7-fe0f', 'transgender_flag'],
|
||||
};
|
||||
|
||||
export const generateMappings = (data: EmojiData): UnicodeMap => {
|
||||
const result = {};
|
||||
const emojis = Object.values(data.emojis ?? {});
|
||||
|
@ -23,7 +47,7 @@ export const generateMappings = (data: EmojiData): UnicodeMap => {
|
|||
const { unified, native } = item;
|
||||
const stripped = unified.replace(stripLeadingZeros, '');
|
||||
|
||||
if (unified.includes('200d') && unified !== '1f441-fe0f-200d-1f5e8-fe0f') {
|
||||
if (unified.includes('200d') && !(unified in blacklist)) {
|
||||
// @ts-ignore
|
||||
result[native] = { unified: stripped, shortcode: value.id };
|
||||
} else {
|
||||
|
@ -35,6 +59,11 @@ export const generateMappings = (data: EmojiData): UnicodeMap => {
|
|||
}
|
||||
}
|
||||
|
||||
for (const [key, value] of Object.entries(tweaks)) {
|
||||
// @ts-ignore
|
||||
result[key] = { unified: value[0], shortcode: value[1] };
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue