Be less lax about spaces between emoji
This commit is contained in:
parent
50ea5fc979
commit
68fc254d88
1 changed files with 2 additions and 2 deletions
|
@ -46,10 +46,10 @@ for line in sys.stdin:
|
||||||
|
|
||||||
if "message" in line and line["message"] != "":
|
if "message" in line and line["message"] != "":
|
||||||
message = line["message"]
|
message = line["message"]
|
||||||
message = re.sub(r"^[#>]* *|[*_`]*", "", message)
|
message = re.sub(r"^[#>]* ?|[*_`]*", "", message)
|
||||||
for emoji, numb in NUMBER_EMOJI.items():
|
for emoji, numb in NUMBER_EMOJI.items():
|
||||||
message = re.sub(f" *:{emoji}: *", numb, message)
|
message = re.sub(f" *:{emoji}: *", numb, message)
|
||||||
message = re.sub(" *:(?:green)?num([0-9]+): *", lambda m: m.group(1), 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", "")
|
||||||
message = message.strip()
|
message = message.strip()
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue