dont replace "cool it" with "fetch it"

master
Aevann 2023-01-20 07:23:19 +02:00
parent 0ab0b9cbe6
commit 61202cb5aa
2 changed files with 3 additions and 2 deletions

View File

@ -189,10 +189,9 @@ if SITE_NAME == 'rDrama':
"my brother in christ": "my brother in Allah", "my brother in christ": "my brother in Allah",
"kyle": "Kylie", "kyle": "Kylie",
"twitter files": 'twitter files <img loading="lazy" data-bs-toggle="tooltip" alt=":marseysleep:" title=":marseysleep:" src="/e/marseysleep.webp">', "twitter files": 'twitter files <img loading="lazy" data-bs-toggle="tooltip" alt=":marseysleep:" title=":marseysleep:" src="/e/marseysleep.webp">',
" cool ": " fetch ", " cool (?!it)": " fetch ",
"krayon": "krayon (sister toucher)", "krayon": "krayon (sister toucher)",
"discord": "groomercord", "discord": "groomercord",
} }
SLURS.update(RDRAMA_SLURS) SLURS.update(RDRAMA_SLURS)

View File

@ -124,6 +124,8 @@ def sub_matcher(match:re.Match, upper=False, replace_with:Union[dict[str, str],
match_str = match.group(group_num) match_str = match.group(group_num)
if match_str.startswith('<'): if match_str.startswith('<'):
return match_str return match_str
elif match_str.lower() == ' cool ':
return ' fetch '
else: else:
repl = replace_with[match_str.lower()] repl = replace_with[match_str.lower()]
return repl if not upper or "<img" in repl else repl.upper() return repl if not upper or "<img" in repl else repl.upper()