feat: add processMistype
This commit is contained in:
parent
409a5cff24
commit
b98cdd5c9d
1 changed files with 9 additions and 0 deletions
|
|
@ -19,6 +19,14 @@ export function processUnsounds(input: string): string {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Process mistype like 'zㅋㅋㅋㅋ' => "ㅋㅋㅋㅋㅋ"
|
||||||
|
export function processMistype(input: string): string {
|
||||||
|
return input.replace(
|
||||||
|
/(z+)(ㅋ+)/g,
|
||||||
|
(_, z: string, tail) => "ㅋ".repeat(z.length) + tail,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// 여러가지 이상한 소리를 내도록 만드는 프롬프트나
|
// 여러가지 이상한 소리를 내도록 만드는 프롬프트나
|
||||||
// 소리를 지르도록 하는 프롬프트를 필터링 합니다.
|
// 소리를 지르도록 하는 프롬프트를 필터링 합니다.
|
||||||
// 예를들어...
|
// 예를들어...
|
||||||
|
|
@ -594,6 +602,7 @@ export namespace processFullWidth {
|
||||||
|
|
||||||
export function saferKorean(input: string): string {
|
export function saferKorean(input: string): string {
|
||||||
return (input.normalize() + " ")
|
return (input.normalize() + " ")
|
||||||
|
.let(processMistype)
|
||||||
.let(processCensor)
|
.let(processCensor)
|
||||||
.let(processUnsounds)
|
.let(processUnsounds)
|
||||||
.let(processFullWidth)
|
.let(processFullWidth)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue