forked from rDrama/rDrama
disable numbered lists
parent
b8534e3586
commit
4ea5dd6d54
|
@ -196,3 +196,5 @@ 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)
|
||||
|
||||
underscore_in_link_regex = regex.compile("(?<=https:\/\/[^\s)]+)_", flags=regex.A)
|
||||
|
||||
numbered_list_regex = re.compile('((\s|^)[0-9]+)\. ', flags=re.A)
|
||||
|
|
|
@ -298,6 +298,8 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=True, count_marseys
|
|||
|
||||
sanitized = underscore_in_link_regex.sub(r'\_', sanitized)
|
||||
|
||||
sanitized = numbered_list_regex.sub(r'\1\. ', sanitized)
|
||||
|
||||
sanitized = markdown(sanitized)
|
||||
|
||||
sanitized = strikethrough_regex.sub(r'\1<del>\2</del>', sanitized)
|
||||
|
|
Loading…
Reference in New Issue