mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-23 07:15:11 +00:00
korean nyaize
This commit is contained in:
parent
3c4bae763f
commit
ddd7b04646
1 changed files with 3 additions and 1 deletions
|
@ -7,5 +7,7 @@ export function nyaize(text: string): string {
|
||||||
// ko-KR
|
// ko-KR
|
||||||
.replace(/[나-낳]/g, match => String.fromCharCode(
|
.replace(/[나-낳]/g, match => String.fromCharCode(
|
||||||
match.codePointAt(0)! + '냐'.charCodeAt(0) - '나'.charCodeAt(0)
|
match.codePointAt(0)! + '냐'.charCodeAt(0) - '나'.charCodeAt(0)
|
||||||
));
|
))
|
||||||
|
.replace(/(다$)|(다(?=\.))|(다(?= ))|(다(?=!))|(다(?=\?))/gm, '다냥')
|
||||||
|
.replace(/(야(?=\?))|(야$)|(야(?= ))/gm, '냥');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue