feat: dz and dd typo fix

This commit is contained in:
kimpure 2026-07-19 09:30:00 +00:00
parent 253657b3b0
commit dda129d2c8
No known key found for this signature in database

View file

@ -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,