Add more unit convertion
This commit is contained in:
parent
4a6eea1900
commit
2e6483a36e
1 changed files with 3 additions and 1 deletions
|
|
@ -163,7 +163,7 @@ export function saferKorean(input: string): string {
|
||||||
mod = SIPrefix[mod.toLowerCase() as keyof typeof SIPrefix];
|
mod = SIPrefix[mod.toLowerCase() as keyof typeof SIPrefix];
|
||||||
return `${num} ${mod}바이트 `;
|
return `${num} ${mod}바이트 `;
|
||||||
})
|
})
|
||||||
.replace(/([\d.]+)[ \t\n]*([개살시])/g, (_, num: string, postfix: string)=>{
|
.replace(/([\d.]+)[ \t\n]*([개살시평명])/g, (_, num: string, postfix: string)=>{
|
||||||
if (num.includes(".")) {
|
if (num.includes(".")) {
|
||||||
return num + postfix;
|
return num + postfix;
|
||||||
}
|
}
|
||||||
|
|
@ -209,5 +209,7 @@ export function saferKorean(input: string): string {
|
||||||
.replace(/[\%\^\&\*\#\@\.\-\+\_\=\/\\♡\$]/g, (t) => (
|
.replace(/[\%\^\&\*\#\@\.\-\+\_\=\/\\♡\$]/g, (t) => (
|
||||||
SymbolMap[t as keyof typeof SymbolMap]
|
SymbolMap[t as keyof typeof SymbolMap]
|
||||||
))
|
))
|
||||||
|
.replace(/㎡/g, "제곱미터")
|
||||||
|
.replace(/㎢/g, "제곱킬로미터")
|
||||||
.replace(/([\?\!]+)/g, (_, content: string) => content[0])
|
.replace(/([\?\!]+)/g, (_, content: string) => content[0])
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue