vc
This commit is contained in:
parent
8f1ab79f95
commit
378b38cc60
21 changed files with 37 additions and 34 deletions
|
@ -106,8 +106,8 @@ SLURS = {
|
|||
|
||||
single_words = "|".join([slur.lower() for slur in SLURS.keys()])
|
||||
|
||||
SLUR_REGEX = re.compile(rf"(?i)((?<=\s|>)|^)({single_words})((?=[\s<,.]|s[\s<,.])|$)", re.A)
|
||||
SLUR_REGEX_UPPER = re.compile(rf"((?<=\s|>)|^)({single_words.upper()})((?=[\s<,.]|s[\s<,.])|$)", re.A)
|
||||
SLUR_REGEX = re.compile(rf"((?<=\s|>)|^)({single_words})((?=[\s<,.$]|s[\s<,.$]))", re.I|re.A)
|
||||
SLUR_REGEX_UPPER = re.compile(rf"((?<=\s|>)|^)({single_words.upper()})((?=[\s<,.$]|S[\s<,.$]))", re.A)
|
||||
|
||||
def sub_matcher(match):
|
||||
return SLURS[match.group(0).lower()]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue