disable numbered lists

pull/108/head
Aevann 2023-02-01 17:59:10 +02:00
parent b8534e3586
commit 4ea5dd6d54
2 changed files with 4 additions and 0 deletions

View File

@ -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)

View File

@ -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)