From 99b0aab5843796083d63e75ebd270e32366a1d27 Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 15 Aug 2023 23:11:05 +0300 Subject: [PATCH] make sharpen award not affect codeblocks --- files/helpers/regex.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/helpers/regex.py b/files/helpers/regex.py index f0842ceeb..6c71487b3 100644 --- a/files/helpers/regex.py +++ b/files/helpers/regex.py @@ -97,11 +97,11 @@ xmaxing_regex = re.compile('(?<=^|(?<=\s))(([a-zA-Z]+?)(s)?max+ing)(?=$|\n|\s|[. initial_part_regex = re.compile('(?<=^)(>+)', flags=re.I|re.A) #matches "the" or is, but only if it is not followed by "fucking". https://regex101.com/r/yxuYsQ/2 -the_fucking_regex = re.compile('(?<=^|(?<=\s))((?:the|a)( (?:only))?|((that )?(?:is|are|was|were|will be|would be)( (?:your|her|his|their|no|a|not|to|too|so|this|the|our|what))?( (a|the))?)|is)(?=\s)(?! fucking)', flags=re.I|re.A) +the_fucking_regex = re.compile('(?<=^|(?<=\s))((?:the|a)( (?:only))?|((that )?(?:is|are|was|were|will be|would be)( (?:your|her|his|their|no|a|not|to|too|so|this|the|our|what))?( (a|the))?)|is)(?=\s)(?! fucking)' + NOT_IN_CODE_OR_LINKS, flags=re.I|re.A) #matches a single question mark but only if it isn't preceded by ", bitch" -bitch_question_mark_regex = re.compile('(?