From b7a79e82eec48f37809e20fd39cff16f71ea303f Mon Sep 17 00:00:00 2001 From: kimpure Date: Thu, 21 May 2026 13:57:47 +0000 Subject: [PATCH] many whitespaces now replace to single space --- packages/utils/saferKorean.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/utils/saferKorean.ts b/packages/utils/saferKorean.ts index faf3b62..a6a92be 100644 --- a/packages/utils/saferKorean.ts +++ b/packages/utils/saferKorean.ts @@ -172,7 +172,7 @@ export function saferKorean(input: string): string { mod = SIPrefix[mod.toLowerCase() as keyof typeof SIPrefix]; return `${num} ${mod}바이트 `; }) - .replace(/([\d\.]+)[ \t\n]*([개살시평명])/g, (_, num: string, postfix: string)=>{ + .replace(/([\d\.]+)\s*([개살시평명])/g, (_, num: string, postfix: string)=>{ // 10명 => 열명 if (num.includes(".")) { return num + postfix; @@ -229,4 +229,5 @@ export function saferKorean(input: string): string { SymbolMap[t as keyof typeof SymbolMap] )) .replace(/([\?\!]+)/g, (_, content: string) => content[0]) + .replace(/\s+/g, " ") }