Skip to content

Commit

Permalink
変更:歌詞の入力内容チェックの正規表現を修正 (#2293)
Browse files Browse the repository at this point in the history
Co-authored-by: Hiroshiba <[email protected]>
  • Loading branch information
rokujyushi and Hiroshiba authored Nov 25, 2024
1 parent ec8ca40 commit 7030529
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/domain/japanese/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ export const convertLongVowel = (text: string): string => {
// 参考:https://github.com/VOICEVOX/voicevox_core/blob/0848630d81ae3e917c6ff2038f0b15bbd4270702/crates/voicevox_core/src/user_dict/word.rs#L83-L90
export const moraPattern = new RegExp(
"(?:" +
"[イ][ェ]|[ヴ][ャュョ]|[トド][ゥ]|[テデ][ィャュョ]|[デ][ェ]|[クグ][ヮ]|" + // rule_others
"[キシチニヒミリギジビピ][ェャュョ]|" + // rule_line_i
"[ツフヴ][ァ]|[ウスツフヴズ][ィ]|[ウツフヴ][ェォ]|" + // rule_line_u
"[イ][ェ]|[ヴ][ャュョ]|[ウクグトド][ゥ]|[テデ][ィェャュョ]|[クグ][ヮ]|" + // rule_others
"[キシチニヒミリギジヂビピ][ェャュョ]|[キニヒミリギビピ][ィ]|" + // rule_line_i
"[クツフヴグ][ァ]|[ウクスツフヴグズ][ィ]|[ウクツフヴグ][ェォ]|" + // rule_line_u
"[ァ-ヴー]|" + // rule_one_mora
"[い][ぇ]|[ゃゅょ]|[とど][ぅ]|[てで][ぃゃゅょ]|[で][ぇ]|[くぐ][]|" + // rule_others
"[きしちにひみりぎじびぴ][ぇゃゅょ]|" + // rule_line_i
"[つふゔ][ぁ]|[うすつふゔず][ぃ]|[うつふゔ][ぇぉ]|" + // rule_line_u
"[い][ぇ]|[ゔ][ゃゅょ]|[うくぐとど][ぅ]|[てで][ぃぇゃゅょ]|[くぐ][]|" + // rule_others
"[きしちにひみりぎじぢびぴ][ぇゃゅょ]|[きにひみりぎびぴ][ぃ]|" + // rule_line_i
"[くつふゔぐ][ぁ]|[うくすつふゔぐず][ぃ]|[うくつふゔぐ][ぇぉ]|" + // rule_line_u
"[ぁ-ゔー]" + // rule_one_mora
")",
"g",
Expand Down

0 comments on commit 7030529

Please sign in to comment.