fix images in slur replacer (#359)

doesn't work with ALL CAPS TEXT, there's prolly a better way for this
master
justcool393 2022-09-18 03:19:37 -07:00 committed by GitHub
parent 6330aabe88
commit e00bf1f9a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ def sub_matcher(match, upper=False):
return match.group(0) return match.group(0)
else: else:
repl = SLURS[match.group(0).lower()] repl = SLURS[match.group(0).lower()]
return repl if not upper else repl.upper() return repl if not upper or "<img" in repl else repl.upper()
def sub_matcher_upper(match): def sub_matcher_upper(match):
return sub_matcher(match, upper=True) return sub_matcher(match, upper=True)