diff --git a/osu.Game.Rulesets.Karaoke.Tests/Helper/TestCaseTagHelper.cs b/osu.Game.Rulesets.Karaoke.Tests/Helper/TestCaseTagHelper.cs
index ec29dea40..32d0ac7fd 100644
--- a/osu.Game.Rulesets.Karaoke.Tests/Helper/TestCaseTagHelper.cs
+++ b/osu.Game.Rulesets.Karaoke.Tests/Helper/TestCaseTagHelper.cs
@@ -129,6 +129,9 @@ public static RomajiTag ParseRomajiTag(string? str)
/// [0,start]:1000 -> has time-tag index with time.
/// [0,start] -> has time-tag index with no time.
/// [0,start]: -> has time-tag index with no time.
+ /// [0,start]#karaoke -> has time-tag index with romaji.
+ /// [0,start]#^karaoke -> has time-tag index with romaji, and it's initial romaji.
+ /// [0,start]:1000#karaoke -> has time-tag index with time and romaji.
///
/// Time tag string format
/// Time tag object
@@ -137,6 +140,7 @@ public static TimeTag ParseTimeTag(string? str)
string regex = generateRegex(time_index_regex, new[]
{
getNumberPropertyRegex(':', "time"),
+ getStringPropertyRegex('#', "text"),
});
return getMatchByStatement(str, regex, result =>
@@ -147,8 +151,14 @@ public static TimeTag ParseTimeTag(string? str)
int index = result.GetGroupValue("index");
var state = result.GetGroupValue("state") == "start" ? TextIndex.IndexState.Start : TextIndex.IndexState.End;
int? time = result.GetGroupValue("time");
+ string? text = result.GetGroupValue("text");
+ bool? initialRomaji = text?.StartsWith("^");
- return new TimeTag(new TextIndex(index, state), time);
+ return new TimeTag(new TextIndex(index, state), time)
+ {
+ RomajiText = text?.Replace("^", ""),
+ InitialRomaji = initialRomaji ?? default,
+ };
});
}