Update english nyaize (#6456)
* Update english nyaize * Update src/misc/nyaize.ts Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
This commit is contained in:
parent
fd363f5617
commit
dc8eb7d4fe
1 changed files with 3 additions and 1 deletions
|
@ -3,7 +3,9 @@ export function nyaize(text: string): string {
|
|||
// ja-JP
|
||||
.replace(/な/g, 'にゃ').replace(/ナ/g, 'ニャ').replace(/ナ/g, 'ニャ')
|
||||
// en-US
|
||||
.replace(/morning/gi, 'mornyan').replace(/everyone/gi, 'everynyan')
|
||||
.replace(/(?<=n)a/gi, x => x === 'A' ? 'YA' : 'ya')
|
||||
.replace(/(?<=morn)ing/gi, x => x === 'ING' ? 'YAN' : 'yan')
|
||||
.replace(/(?<=every)one/gi, x => x === 'ONE' ? 'NYAN' : 'nyan')
|
||||
// ko-KR
|
||||
.replace(/[나-낳]/g, match => String.fromCharCode(
|
||||
match.charCodeAt(0)! + '냐'.charCodeAt(0) - '나'.charCodeAt(0)
|
||||
|
|
Loading…
Reference in a new issue