diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2020-02-05 21:11:24 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2020-02-05 21:11:24 +0900 |
| commit | ddd7b0464604f3068c439aad5ba5d58079c249ae (patch) | |
| tree | 899138b39b180b52815968705da843d23b88a377 /src/misc | |
| parent | Revert "Korean, English Nyaziation and special case exclusion (#5813)" (diff) | |
| download | misskey-ddd7b0464604f3068c439aad5ba5d58079c249ae.tar.gz misskey-ddd7b0464604f3068c439aad5ba5d58079c249ae.tar.bz2 misskey-ddd7b0464604f3068c439aad5ba5d58079c249ae.zip | |
korean nyaize
Diffstat (limited to 'src/misc')
| -rw-r--r-- | src/misc/nyaize.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/misc/nyaize.ts b/src/misc/nyaize.ts index 38c7101766..b0f3ad4d51 100644 --- a/src/misc/nyaize.ts +++ b/src/misc/nyaize.ts @@ -7,5 +7,7 @@ export function nyaize(text: string): string { // ko-KR .replace(/[나-낳]/g, match => String.fromCharCode( match.codePointAt(0)! + '냐'.charCodeAt(0) - '나'.charCodeAt(0) - )); + )) + .replace(/(다$)|(다(?=\.))|(다(?= ))|(다(?=!))|(다(?=\?))/gm, '다냥') + .replace(/(야(?=\?))|(야$)|(야(?= ))/gm, '냥'); } |