master
Aevann1 2021-11-25 23:44:05 +02:00
parent 6b7fd2ad1a
commit ea88aef3b5
1 changed files with 1 additions and 1 deletions

View File

@ -180,7 +180,7 @@ PUSHER_INSTANCE_ID = '02ddcc80-b8db-42be-9022-44c546b4dce6'
PUSHER_KEY = environ.get("PUSHER_KEY", "").strip() PUSHER_KEY = environ.get("PUSHER_KEY", "").strip()
single_words = "|".join([slur.lower() for slur in SLURS.keys()]) single_words = "|".join([slur.lower() for slur in SLURS.keys()])
SLUR_REGEX = re.compile(rf"(?i)(?<=\s|>)({single_words})(?=[\s<,.]|s[\s<,.])") SLUR_REGEX = re.compile(rf"(?i)((?<=\s|>)|^)(nigger)((?=[\s<,.]|s[\s<,.])|$)")
def sub_matcher(match: re.Match) -> str: def sub_matcher(match: re.Match) -> str:
return SLURS[match.group(0).lower()] return SLURS[match.group(0).lower()]