master
Aevann1 2021-10-05 22:48:59 +02:00
parent cfc6b8a3d4
commit a27e651744
1 changed files with 0 additions and 2 deletions

View File

@ -193,7 +193,6 @@ def sanitize(sanitized, noimages=False):
new = old.lower()
for i in re.finditer('\w*(?<!"):([^ ]{1,30}?):', new):
emoji = i.group(1).lower()
print(emoji)
if path.isfile(f'./files/assets/images/emojis/{emoji}.webp'):
new = re.sub(f'\w*(?<!"):{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{emoji}:" title=":{emoji}:" delay="0" height=60 src="https://{site}/assets/images/emojis/{emoji}.webp">', new)
@ -202,7 +201,6 @@ def sanitize(sanitized, noimages=False):
for i in re.finditer('\w*(?<!")!([^ ]{1,30}?)!', new):
emoji = i.group(1).lower()
print(emoji)
if path.isfile(f'./files/assets/images/emojis/{emoji}.webp'):
new = re.sub(f'\w*(?<!")!{emoji}!', f'<img loading="lazy" data-bs-toggle="tooltip" alt="!{emoji}!" title="!{emoji}!" delay="0" height=60 src="https://{site}/assets/images/emojis/{emoji}.webp" style="transform: scaleX(-1)">', new)