fix unicode emoji process order

This commit is contained in:
kimpure 2026-05-21 14:53:48 +00:00
parent b98183894c
commit eeb241360e
No known key found for this signature in database

View file

@ -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()
}