fix comment jumping
parent
e87d5b9db8
commit
4dfb21cd0a
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue