From 3b271cf1be5b4bdf602dbcc416b6885ca3648382 Mon Sep 17 00:00:00 2001 From: Chuck Sneed Date: Sun, 25 Jun 2023 14:33:26 -0500 Subject: [PATCH] more queenshit (I couldn't help myself) --- files/helpers/regex.py | 14 ++++++++++++++ files/helpers/sanitize.py | 8 ++++++++ 2 files changed, 22 insertions(+) diff --git a/files/helpers/regex.py b/files/helpers/regex.py index 878f53700..daa96b50f 100644 --- a/files/helpers/regex.py +++ b/files/helpers/regex.py @@ -82,6 +82,20 @@ like_before_regex = re.compile('(?<=^|(?<=\s))(?+)', flags=re.I|re.A) image_check_regex = re.compile(f'!\[\]\(((?!(https:\/\/({hosts})\/|\/)).*?)\)', flags=re.A) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 9aa958c47..0393506f3 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -701,6 +701,14 @@ def torture_queen(string, key): string = greeting_regex.sub(r"hiiiiiiiiii", string) string = like_after_regex.sub(r"\g<1> like", string) string = like_before_regex.sub(r"like \g<1>", string) + string = redpilled_regex.sub(r"goodpill\g<2>", string) + string = based_and_x_pilled_regex.sub(r"comfy \g<2> vibes", string) + string = based_regex.sub(r"comfy", string) + string = x_pilled_regex.sub(r"\g<2> vibes", string) + string = xmax_regex.sub(r"normalize good \g<2>s", string) + string = xmaxing_regex.sub(r"normalizing good \g<2>s", string) + string = xmaxed_regex.sub(r"normalized good \g<2>s", string) + string = normal_punctuation_regex.sub("", string) string = more_than_one_comma_regex.sub(",", string) if string[-5:] == ', and':