Skip to content
This repository was archived by the owner on Jun 29, 2019. It is now read-only.

Commit 1a9b3fe

Browse files
committed
feat(emoji): Update Emoji Constants
1 parent 9cf19d7 commit 1a9b3fe

File tree

2 files changed

+800
-560
lines changed

2 files changed

+800
-560
lines changed

Scripts/Emoji.linq

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ var shortnames = new List<string>();
1919
var emojiMapping = new StringBuilder();
2020
foreach (var emoji in emojis)
2121
{
22-
var unicode = emoji.Value["unicode_output"].ToString().Split('-').Select(w => $"\\U{w.PadLeft(8, '0')}");
22+
23+
var unicode = (string.IsNullOrWhiteSpace(emoji.Value["unicode_output"].ToString()) ? emoji.Key : emoji.Value["unicode_output"].ToString()).Split('-').Select(w => $"\\U{w.PadLeft(8, '0')}");
2324
emojiMapping.AppendLine($" new Emoji {{ Shortname = \"{ emoji.Value["shortname"] }\", Unicode = \"{ string.Join("", unicode) }\" }},");
2425
shortnames.Add((string) emoji.Value["shortname"]);
2526
if (regex.IsMatch(emoji.Value["shortname"].ToString()) && !shortnames.Contains(emoji.Value["shortname"].ToString().Replace("flag_", "")))

0 commit comments

Comments
 (0)