When I integrated new emojione into my project, I noticed that emojis related to the category of diversity were not displayed.
Apparently there was a problem in create_ruleset.py and I fixed it like below.
shortcode_replace[shortname] = unicode_hex
category_replace[shortname] = value['category']
+ if value['diversity']:
+ category_replace[shortname] = 'diversity'
+
if '-' not in unicode_hex:
unicode_char = chr(int(unicode_hex, 16))
unicode_replace[unicode_char.encode('utf-8')] = shortname
I'd like to get ruleset.py to be compatible with old emoji's shortnames besides.
I added the codes like below.
unicode_char = ''.join(chr(int(part, 16)) for part in parts)
unicode_replace[unicode_char.encode('utf-8')] = shortname
+ if value['shortname_alternates']:
+ for shortname_alternate in value['shortname_alternates']:
+ shortcode_replace[shortname_alternate] = shortcode_replace[shortname]
+ category_replace[shortname_alternate] = category_replace[shortname]
+
print(unicode_replace)
print(shortcode_replace)
print(ascii_replace)
HI.
When I integrated new emojione into my project, I noticed that emojis related to the category of diversity were not displayed. Apparently there was a problem in create_ruleset.py and I fixed it like below.
I'd like to get ruleset.py to be compatible with old emoji's shortnames besides. I added the codes like below.