Skip to content

Commit

Permalink
fix(jukebox): fix regex
Browse files Browse the repository at this point in the history
  • Loading branch information
blueset committed Nov 5, 2023
1 parent 8a7342a commit 4da11fb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { FURIGANA, LyricsLine, RangeAttributeLabel } from "lyrics-kit/core";

const pattern =
"(([あいうえおアイウエオゕゖヵヶてでテデんン]|[きぎしじちぢにひびぴみりゐキギシジチヂニヒビピミリヰヸ]([ゃャ]|[ゅょュョ][うウ]?)*|[くぐすずつづぬふぶぷむゆるゔクグスズツヅヌフブプムユルヴ][うウ]*|[けげせぜねへべぺめれゑケゲセゼネヘベペメレヱヹ][いイ]*|[こごそぞとどのほぼぽもよろをコゴソゾトドノホボポモヨロヲヺ][うウ]*)[ぁぃぅぇぉっァィゥェォッーんン]*|\\p{sc=Han}|[\\p{sc=Latin}\\p{sc=Cyrillic}\\p{sc=Greek}\\p{Nd}]+)";
"(([あいうえおアイウエオゕゖヵヶてでテデんン]|[かがさざただなはばぱまやらわカガサザタダナハバパマヤラワヷ]|[きぎしじちぢにひびぴみりゐキギシジチヂニヒビピミリヰヸ]([ゃャ]|[ゅょュョ][うウ]?)*|[くぐすずつづぬふぶぷむゆるゔクグスズツヅヌフブプムユルヴ][うウ]*|[けげせぜねへべぺめれゑケゲセゼネヘベペメレヱヹ][いイ]*|[こごそぞとどのほぼぽもよろをコゴソゾトドノホボポモヨロヲヺ][うウ]*)[ぁぃぅぇぉっァィゥェォッーんン]*|\\p{sc=Han}|[\\p{sc=Latin}\\p{sc=Cyrillic}\\p{sc=Greek}\\p{Nd}]+)";
const beginPattern = new RegExp(pattern, "u");
const countPattern = new RegExp(pattern, "gu");

Expand Down

0 comments on commit 4da11fb

Please sign in to comment.