rename a variable for clarity

pull/208/head
Aevann 2023-09-21 22:32:59 +03:00
parent f11c687866
commit 8efb8de6cb
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ title_regex = re.compile("[^\w ]", flags=re.A)
controversial_regex = re.compile('https:\/\/old\.reddit\.com/r/\w{2,20}\/comments\/[\w\-.#&/=\?@%+]{5,250}', flags=re.A)
spoiler_regex = re.compile('\|\|(.+?)\|\|' + NOT_IN_CODE_OR_LINKS, flags=re.A)
sub_regex = re.compile('(?<![\w/])\/?([hH]\/\w{3,25})' + NOT_IN_CODE_OR_LINKS, flags=re.A)
hole_mention_regex = re.compile('(?<![\w/])\/?([hH]\/\w{3,25})' + NOT_IN_CODE_OR_LINKS, flags=re.A)
strikethrough_regex = re.compile('(^|\s|>|")~{1,2}([^~]+)~{1,2}' + NOT_IN_CODE_OR_LINKS, flags=re.A)

View File

@ -449,7 +449,7 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=False, count_emojis
sanitized = sanitized.replace('<a href="/%21', '<a href="/!')
sanitized = reddit_mention_regex.sub(r'<a href="https://old.reddit.com/\1" rel="nofollow noopener" target="_blank">/\1</a>', sanitized)
sanitized = sub_regex.sub(r'<a href="/\1">/\1</a>', sanitized)
sanitized = hole_name_regex.sub(r'<a href="/\1">/\1</a>', sanitized)
v = getattr(g, 'v', None)