fix comment jumping

pull/127/head
Aevann 2023-02-18 23:03:23 +02:00
parent e87d5b9db8
commit 4dfb21cd0a
2 changed files with 3 additions and 1 deletions

View File

@ -314,7 +314,7 @@ class Comment(Base):
if path == '/admin/removed/comments': return False
if '?context' in path or f'/{self.id}' in path: return False
if comment_link_regex.search(path): return False
if self.over_18 and not (v and v.over_18) and not (self.post and self.post.over_18): return True

View File

@ -194,3 +194,5 @@ reason_regex_comment = re.compile('(/comment/[0-9]+)', flags=re.A)
discord_username_regex = re.compile("(\s|^|>).{2,32}#[0-9]{4}(?=[^0-9]|$)", flags=re.A)
numbered_list_regex = re.compile('((\s|^)[0-9]+)\. ', flags=re.A)
comment_link_regex = re.compile("/[0-9]+$", flags=re.A)