add arrow convert
This commit is contained in:
parent
cfac4f115c
commit
94b6ba2d7d
1 changed files with 7 additions and 2 deletions
|
|
@ -175,6 +175,11 @@ export const GIFMap = {
|
|||
"images-ext-1.discordapp.net/external/2R41WcvNJwYMD69UKls2cDa_hEL-rzCRCFvOi2DDOVo/https/media.tenor.com/sU3RCOixDbgAAAPo/majo-no-tabitabi-the-journey-of-elaina.mp4": "일레이나 손짓",
|
||||
};
|
||||
|
||||
export const Units = {
|
||||
"㎢": "제곱킬로미터",
|
||||
"㎡": "제곱미터",
|
||||
}
|
||||
|
||||
export function processDots(input: string): string {
|
||||
return input.replace(/[\.,]+$/, "")
|
||||
.replace(/[\.,]{2,}/g, "")
|
||||
|
|
@ -333,8 +338,7 @@ export function saferKorean(input: string): string {
|
|||
return FloatKorean.convert(num) + postfix;
|
||||
}
|
||||
})
|
||||
.replace(/㎡/g, "제곱미터")
|
||||
.replace(/㎢/g, "제곱킬로미터")
|
||||
.replace(/[㎡㎢]/g, (content: string) => Units[content as keyof typeof Units])
|
||||
|
||||
// Process symbol
|
||||
.replace(/[\%\^\&\*\#\@\.\-\+\_\=\/\\♡\$\|\:\;\>\<]/g, (t) => (
|
||||
|
|
@ -344,6 +348,7 @@ export function saferKorean(input: string): string {
|
|||
.replace(/[ \t\f\r]+/g, " ")
|
||||
|
||||
// Process emoji
|
||||
.replace(/[↑↓←→↓↔↕↖↗↘↙]/g, "화살표")
|
||||
.replace(/\p{Emoji}/u, " 이모지 ")
|
||||
.trim()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue