From 4466d73ae5abf1db2a4b8022a36838b6de22843b Mon Sep 17 00:00:00 2001 From: RedGuy12 Date: Thu, 5 Oct 2023 22:23:30 -0500 Subject: [PATCH] 13805 Signed-off-by: RedGuy12 --- modules/automod/language.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/automod/language.ts b/modules/automod/language.ts index 4015b754a..43e7cd37e 100644 --- a/modules/automod/language.ts +++ b/modules/automod/language.ts @@ -32,7 +32,7 @@ function decodeRegexps(regexps: RegExp[]) { "p": "⒫⍴ppⓟℙₚᴘρϱⲣрየꮲᑭꓑ𝐏", "q": "⒬۹9oqqⓠℚϙϱԛфգզⵕᑫ𝐐", "r": "⒭rrⓡℝℛℜʀɾꭇꭈᴦⲅгհዪꭱꮁꮢꮧᖇꓣ乃几卂尺𝐑", - "s": "⒮§$₴5ssⓢₛꜱʂƽςѕꙅտֆꭶꮥꮪᔆᔕꓢ丂𝐒", + "s": "⒮§$₴ssⓢₛꜱʂƽςѕꙅտֆꭶꮥꮪᔆᔕꓢ丂𝐒", "t": "⒯⊤⟙ℑttⓣₜᴛŧƫƭτⲧтፕꭲꮏキꓔ千", "u": "⒰*∪⋃uuⓤꞟᴜꭎꭒɥvʋυսሀሁᑌꓴ𝐔-", "v": "⒱℣√∨⋁☑✅✔✔️۷٧uvvⅴⓥⱽᴠνѵⴸꮙꮩᐯᐺꓦ𝐕", @@ -64,8 +64,9 @@ export default function tryCensor(text: string, strikeShift = 0) { words[index] ??= []; return string.replaceAll(regexp, (word) => { - words[index]?.push(word); + if (!Number.isNaN(+word)) return word; + words[index]?.push(word); return word.length < 3 ? "#".repeat(word.length) : word[0] + "#".repeat(word.length - 1);