From 0cfdd6fdb6d239d2950e8e1742d4aa93a9643925 Mon Sep 17 00:00:00 2001 From: Aevann Date: Thu, 27 Apr 2023 15:45:20 +0200 Subject: [PATCH] dont generate pings inside polls (cuz it breaks them) --- files/helpers/regex.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/files/helpers/regex.py b/files/helpers/regex.py index 24682b32b..4286fd598 100644 --- a/files/helpers/regex.py +++ b/files/helpers/regex.py @@ -7,8 +7,8 @@ from .config.const import * valid_username_regex = re.compile("^[\w\-]{3,25}$", flags=re.A) -mention_regex = re.compile('(?|[^`]*`))', flags=re.A) -group_mention_regex = re.compile('(?|[^`]*`))', flags=re.A|re.I) +mention_regex = re.compile('(?|[^`]*`))', flags=re.A) +group_mention_regex = re.compile('(?|[^`]*`))', flags=re.A|re.I) everyone_regex = re.compile('(^|\s|>)!(everyone)(?!([^<]*<\/(code|pre|a)>|[^`]*`))', flags=re.A) @@ -31,8 +31,8 @@ valid_sub_regex = re.compile("^[\w\-]{3,25}$", flags=re.A) query_regex = re.compile("(\w+):(\S+)", flags=re.A) poll_regex = re.compile("(^|\n)\$\$([^\$\n]+)\$\$\s*?(?!([^<]*<\/(code|pre|a)>|[^`]*`))", flags=re.A) -bet_regex = re.compile("(^|\n)##([^\!\n]+)##\s*?(?!([^<]*<\/(code|pre|a)>|[^`]*`))", flags=re.A) -choice_regex = re.compile("(^|\n)&&([^\&\n]+)&&\s*?(?!([^<]*<\/(code|pre|a)>|[^`]*`))", flags=re.A) +bet_regex = re.compile("(^|\n)##([^#\n]+)##\s*?(?!([^<]*<\/(code|pre|a)>|[^`]*`))", flags=re.A) +choice_regex = re.compile("(^|\n)&&([^&\n]+)&&\s*?(?!([^<]*<\/(code|pre|a)>|[^`]*`))", flags=re.A) html_comment_regex = re.compile("", flags=re.A)