mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-25 22:22:51 +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
fd363f5617
commit
dc8eb7d4fe
@ -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