Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_download():
assert demoji.download_codes() is None
assert type(demoji._EMOJI_PAT) == type(re.compile("")) # noqa
assert isinstance(demoji._CODE_TO_DESC, dict)
assert os.path.isfile(demoji.CACHEPATH)
def process_unicode_emojis(m):
e = m.group()
e = re.sub(r'[\U0000FE00-\U0000FE0F]$', '', e)
title_e = re.sub(r'[\U0001F3FB-\U0001F3FF]$', '', e)
if not title_e:
title_e = e
title = UNICODE_LIST.get(title_e) or demoji._CODE_TO_DESC[title_e]
codepoint = "-".join(['%04x' % ord(_c) for _c in e]).lstrip('0')
return fr'<img alt="{e}" title=":{title}:" class="emoji">'