forked from rDrama/rDrama
remove underscore_in_link_regex
parent
7d4038b1c6
commit
59ee320584
|
@ -195,6 +195,4 @@ reason_regex = re.compile('(/(post|comment)/[0-9]+)', flags=re.A)
|
||||||
|
|
||||||
discord_username_regex = re.compile("(\s|^|>).{2,32}#[0-9]{4}(?=[^0-9]|$)", flags=re.A)
|
discord_username_regex = re.compile("(\s|^|>).{2,32}#[0-9]{4}(?=[^0-9]|$)", flags=re.A)
|
||||||
|
|
||||||
underscore_in_link_regex = regex.compile("(?<=https:\/\/[^\s)]+)_", flags=regex.A)
|
|
||||||
|
|
||||||
numbered_list_regex = re.compile('((\s|^)[0-9]+)\. ', flags=re.A)
|
numbered_list_regex = re.compile('((\s|^)[0-9]+)\. ', flags=re.A)
|
||||||
|
|
|
@ -296,8 +296,6 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=True, count_marseys
|
||||||
if FEATURES['MARKUP_COMMANDS']:
|
if FEATURES['MARKUP_COMMANDS']:
|
||||||
sanitized = command_regex.sub(command_regex_matcher, sanitized)
|
sanitized = command_regex.sub(command_regex_matcher, sanitized)
|
||||||
|
|
||||||
sanitized = underscore_in_link_regex.sub(r'\_', sanitized)
|
|
||||||
|
|
||||||
sanitized = numbered_list_regex.sub(r'\1\. ', sanitized)
|
sanitized = numbered_list_regex.sub(r'\1\. ', sanitized)
|
||||||
|
|
||||||
sanitized = markdown(sanitized)
|
sanitized = markdown(sanitized)
|
||||||
|
|
Loading…
Reference in New Issue