fix: make processCensor more simple
This commit is contained in:
parent
aa8aa9ada2
commit
d71043b92b
1 changed files with 2 additions and 2 deletions
|
|
@ -19,11 +19,11 @@ export function processUnsounds(input: string): string {
|
||||||
export function processCensor(input: string): string {
|
export function processCensor(input: string): string {
|
||||||
return input
|
return input
|
||||||
.replace(
|
.replace(
|
||||||
/(흐[아으앙응앗웅응ㅡ]+[!?.,><]*)|(하[아으앙응앗웅응ㅡ]+[!?.,><]*)/g,
|
/([흐하해헤][아으앙응앗웅응ㅡ!?.,><]+)/g,
|
||||||
(content: string) => content[0] ?? "",
|
(content: string) => content[0] ?? "",
|
||||||
)
|
)
|
||||||
.replace(
|
.replace(
|
||||||
/[아ㅏ어ㅓ으ㅡ우ㅜ에오ㅗ야ㅑ앙읏웃앗엣웅응흐헤헼헥하あアうおーaAoOuU][아ㅏ어ㅓ으ㅡ우ㅜ에오ㅗ야ㅑ앙읏웃앗엣웅응흐헤헼헥하あアうおーaAoOuU!.,><]{2,}/g,
|
/[아ㅏ어ㅓ으ㅡ우ㅜ에오ㅗ야ㅑ앙읏웃앗엣웅응흐해헤헼헥하あアうおーaAoOuU][아ㅏ어ㅓ으ㅡ우ㅜ에오ㅗ야ㅑ앙읏웃앗엣웅응흐해헤헼헥하あアうおーaAoOuU!.,><]{2,}/g,
|
||||||
(content: string) => content.substring(0, 3),
|
(content: string) => content.substring(0, 3),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue