fix unicode emoji process order
This commit is contained in:
parent
b98183894c
commit
eeb241360e
1 changed files with 3 additions and 3 deletions
|
|
@ -177,9 +177,6 @@ export function saferKorean(input: string): string {
|
|||
return "링크";
|
||||
})
|
||||
|
||||
// Process emoji
|
||||
.replace(/\p{Emoji}/u, " 이모지 ")
|
||||
|
||||
// Process koreans
|
||||
.replace(/ㅋ{2,}/g, (content) => "크".repeat(content.length))
|
||||
.replace(/[아ㅏ]{3,}/g, "아아아")
|
||||
|
|
@ -283,5 +280,8 @@ export function saferKorean(input: string): string {
|
|||
))
|
||||
.replace(/([\?\!]+)/g, (_, content: string) => content[0])
|
||||
.replace(/[ \t\f\r]+/g, " ")
|
||||
|
||||
// Process emoji
|
||||
.replace(/\p{Emoji}/u, " 이모지 ")
|
||||
.trim()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue