3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-19 16:05:01 +00:00

automod: fix normalize not trimming whitespace in ascii-only messages

This commit is contained in:
Dragory 2020-09-16 22:33:24 +03:00
parent 5f28d3513e
commit c2538063d5

View file

@ -150,7 +150,7 @@ const REPLACED_CHARS: Record<string, RegExp> = Array.from(Object.entries(REPLACE
{}, {},
); );
const NORMAL_CHARS_REGEX = /^[a-z2689:.\-_+()*&^%><;"'}{~,\s]+$/i; const NORMAL_CHARS_REGEX = /^[a-z2689:.\-_+()*&^%><;"'}{~,]+$/i;
function containsOnlyNormalChars(text: string) { function containsOnlyNormalChars(text: string) {
return NORMAL_CHARS_REGEX.test(text); return NORMAL_CHARS_REGEX.test(text);