feat: dz and dd typo fix
This commit is contained in:
parent
253657b3b0
commit
dda129d2c8
1 changed files with 8 additions and 0 deletions
|
|
@ -21,6 +21,14 @@ export function processUnsounds(input: string): string {
|
||||||
|
|
||||||
// Process mistype like 'zㅋㅋㅋㅋ' => "ㅋㅋㅋㅋㅋ"
|
// Process mistype like 'zㅋㅋㅋㅋ' => "ㅋㅋㅋㅋㅋ"
|
||||||
export function processMistype(input: string): string {
|
export function processMistype(input: string): string {
|
||||||
|
const trimContent = input.trim();
|
||||||
|
|
||||||
|
if (trimContent == "dz") {
|
||||||
|
return "ㅇㅋ";
|
||||||
|
} else if (trimContent == "dd") {
|
||||||
|
return "ㅇㅇ";
|
||||||
|
}
|
||||||
|
|
||||||
return input.replace(
|
return input.replace(
|
||||||
/(z+)(ㅋ+)/g,
|
/(z+)(ㅋ+)/g,
|
||||||
(_, z: string, tail) => "ㅋ".repeat(z.length) + tail,
|
(_, z: string, tail) => "ㅋ".repeat(z.length) + tail,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue