Ignore zero width space

This commit is contained in:
Midgard 2023-12-18 18:36:29 +01:00
parent 0d2dd03691
commit c3459defed
Signed by: midgard
GPG key ID: 511C112F1331BBB4

View file

@ -50,7 +50,7 @@ for line in sys.stdin:
for emoji, numb in NUMBER_EMOJI.items():
message = re.sub(f" *:{emoji}: *", numb, message)
message = re.sub(" ?:(?:green)?num([0-9]+): ?", lambda m: m.group(1), message)
message = message.replace("\ufe0f", "").replace("\u20e3", "")
message = message.replace("\ufe0f", "").replace("\u20e3", "").replace("\u200b", "")
message = message.strip()
else:
try: