mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-12-11 21:28:12 +09:00
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
d8589d414d
commit
ddae6e089b
@ -3,7 +3,9 @@ export function nyaize(text: string): string {
|
|||||||
// ja-JP
|
// ja-JP
|
||||||
.replace(/な/g, 'にゃ').replace(/ナ/g, 'ニャ').replace(/ナ/g, 'ニャ')
|
.replace(/な/g, 'にゃ').replace(/ナ/g, 'ニャ').replace(/ナ/g, 'ニャ')
|
||||||
// en-US
|
// 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
|
// ko-KR
|
||||||
.replace(/[나-낳]/g, match => String.fromCharCode(
|
.replace(/[나-낳]/g, match => String.fromCharCode(
|
||||||
match.charCodeAt(0)! + '냐'.charCodeAt(0) - '나'.charCodeAt(0)
|
match.charCodeAt(0)! + '냐'.charCodeAt(0) - '나'.charCodeAt(0)
|
||||||
|
Loading…
Reference in New Issue
Block a user