def update_emoji():
 global RE_EMOJI
 global URL_EMOJI
 emoji_list = get_github_emoji()
 emoji_map = {}
 if (emoji_list is not None):
  for emoji in emoji_list:
   url = emoji_list[emoji]
   m = RE_ASSET.match(url)
   if m:
    emoji_map[emoji] = m.group(u'image')
 if emoji_map:
  RE_EMOJI = (u':(%s):' % u'|'.join([re.escape(key) for key in sorted(emoji_map.keys())]))
  URL_EMOJI = copy.copy(emoji_map)

def update_emoji ( ) : global RE_EMOJI global URL_EMOJI emoji_list = get_github_emoji ( ) emoji_map = { } if ( emoji_list is not None ) : for emoji in emoji_list : url = emoji_list [ emoji ] m = RE_ASSET . match ( url ) if m : emoji_map [ emoji ] = m . group ( u'image' ) if emoji_map : RE_EMOJI = ( u':(%s):' % u'|' . join ( [ re . escape ( key ) for key in sorted ( emoji_map . keys ( ) ) ] ) ) URL_EMOJI = copy . copy ( emoji_map )
update the emoji pattern in memory .