Revert "fix this https://stupidpol.site/post/149214/food-wars-ii-marseychingchong-strikes-back/3642965#context"
This reverts commit afd6949998
.
pull/134/head
parent
3af5de76dc
commit
19482f4205
|
@ -48,8 +48,8 @@ strikethrough_regex = re.compile('(^|\s|>)~{1,2}([^~]+)~{1,2}(?![^<]*<\/(code|pr
|
|||
mute_regex = re.compile("\/mute @?([a-z0-9_\-]{3,30}) ([0-9]+)", flags=re.A|re.I)
|
||||
|
||||
emoji_regex = re.compile(f"<p>\s*(:[!#@]{{0,3}}[{valid_username_chars}]+:\s*)+<\/p>", flags=re.A)
|
||||
emoji_regex2 = re.compile(f'(?<!="):([!#@{valid_username_chars}]{{1,36}}?):(?![^<]*<\/(code|pre|a)>)', flags=re.A)
|
||||
emoji_regex3 = re.compile(f'(?<!="):([!@{valid_username_chars}]{{1,35}}?):', flags=re.A)
|
||||
emoji_regex2 = re.compile(f'(?<!"):([!#@{valid_username_chars}]{{1,36}}?):(?![^<]*<\/(code|pre|a)>)', flags=re.A)
|
||||
emoji_regex3 = re.compile(f'(?<!"):([!@{valid_username_chars}]{{1,35}}?):', flags=re.A)
|
||||
|
||||
snappy_url_regex = re.compile('<a href="(https?:\/\/.+?)".*?>(.+?)<\/a>', flags=re.A)
|
||||
snappy_youtube_regex = re.compile('<lite-youtube videoid="(.+?)" params="autoplay=1', flags=re.A)
|
||||
|
|
|
@ -265,7 +265,7 @@ def render_emoji(html, regexp, golden, marseys_used, b=False):
|
|||
|
||||
if emoji_html:
|
||||
marseys_used.add(emoji)
|
||||
html = re.sub(f'(?<!="){i.group(0)}(?![^<]*<\/(code|pre|a)>)', emoji_html, html)
|
||||
html = re.sub(f'(?<!"){i.group(0)}(?![^<]*<\/(code|pre|a)>)', emoji_html, html)
|
||||
return html
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue