From 61202cb5aaf26cc1a2edf9c3cff414a24b3e5116 Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 20 Jan 2023 07:23:19 +0200 Subject: [PATCH] dont replace "cool it" with "fetch it" --- files/helpers/config/const.py | 3 +-- files/helpers/regex.py | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/files/helpers/config/const.py b/files/helpers/config/const.py index 1e0fabb048..f7f7455f55 100644 --- a/files/helpers/config/const.py +++ b/files/helpers/config/const.py @@ -189,10 +189,9 @@ if SITE_NAME == 'rDrama': "my brother in christ": "my brother in Allah", "kyle": "Kylie", "twitter files": 'twitter files :marseysleep:', - " cool ": " fetch ", + " cool (?!it)": " fetch ", "krayon": "krayon (sister toucher)", "discord": "groomercord", - } SLURS.update(RDRAMA_SLURS) diff --git a/files/helpers/regex.py b/files/helpers/regex.py index 1e4bdc2e6c..2980087212 100644 --- a/files/helpers/regex.py +++ b/files/helpers/regex.py @@ -124,6 +124,8 @@ def sub_matcher(match:re.Match, upper=False, replace_with:Union[dict[str, str], match_str = match.group(group_num) if match_str.startswith('<'): return match_str + elif match_str.lower() == ' cool ': + return ' fetch ' else: repl = replace_with[match_str.lower()] return repl if not upper or "