From d2041db91f8e7ee3415247dc2fb93982fe890552 Mon Sep 17 00:00:00 2001 From: Kainoa Kanter Date: Mon, 22 May 2023 15:57:56 +0000 Subject: [PATCH] Nyanize non[consonant] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🟨⬜🟪⬛ https://calckey.social/notes/9f2l6x5u8e --- packages/backend/src/misc/nyaize.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/backend/src/misc/nyaize.ts b/packages/backend/src/misc/nyaize.ts index b85f1d918..a8af59450 100644 --- a/packages/backend/src/misc/nyaize.ts +++ b/packages/backend/src/misc/nyaize.ts @@ -9,6 +9,7 @@ export function nyaize(text: string): string { .replace(/(?<=n)a/gi, (x) => (x === "A" ? "YA" : "ya")) .replace(/(?<=morn)ing/gi, (x) => (x === "ING" ? "YAN" : "yan")) .replace(/(?<=every)one/gi, (x) => (x === "ONE" ? "NYAN" : "nyan")) + .replace(/non(?=[bcdfghjklmnpqrstvwxyz])/gi, (x) => (x === "NON" ? "NYAN" : "nyan")) // ko-KR .replace(/[나-낳]/g, (match) => String.fromCharCode(