many whitespaces now replace to single space
This commit is contained in:
parent
8c793863aa
commit
b7a79e82ee
1 changed files with 2 additions and 1 deletions
|
|
@ -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, " ")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue