summaryrefslogtreecommitdiff
path: root/src/misc/nyaize.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2020-06-21 16:37:43 +0900
committersyuilo <syuilotan@yahoo.co.jp>2020-06-21 16:37:43 +0900
commit8dbdab4a470f0bb263a22d634ec0a8dd3fa2df1d (patch)
tree707d2915e50a9e62f92b5f758b47d9bf1aea4324 /src/misc/nyaize.ts
parentchore(client): Improve emoji picker usability (diff)
parentプロフィールの「場所」「誕生日」を連合するように Reso... (diff)
downloadmisskey-8dbdab4a470f0bb263a22d634ec0a8dd3fa2df1d.tar.gz
misskey-8dbdab4a470f0bb263a22d634ec0a8dd3fa2df1d.tar.bz2
misskey-8dbdab4a470f0bb263a22d634ec0a8dd3fa2df1d.zip
Merge branch 'develop' of https://github.com/syuilo/misskey into develop
Diffstat (limited to 'src/misc/nyaize.ts')
-rw-r--r--src/misc/nyaize.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/misc/nyaize.ts b/src/misc/nyaize.ts
index 6ee3b68477..500d1db2cb 100644
--- a/src/misc/nyaize.ts
+++ b/src/misc/nyaize.ts
@@ -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)