Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle timestamp mod content #29172

Merged
merged 3 commits into from
Jul 29, 2024

Conversation

kadambishreyas
Copy link
Contributor

Resolves #29146

Copy link
Member

@peppy peppy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems fine

@peppy peppy requested review from bdach and peppy and removed request for peppy July 29, 2024 04:22
@@ -32,7 +33,10 @@ public static class EditorTimestampParser
/// <item>1:02:300 (1,2,3) - parses to 01:02:300 with selection</item>
/// </list>
/// </example>
private static readonly Regex time_regex_lenient = new Regex(@"^(((?<minutes>\d{1,3}):(?<seconds>([0-5]?\d))([:.](?<milliseconds>\d{0,3}))?)(?<selection>\s\([^)]+\))?)$", RegexOptions.Compiled);
private static readonly Regex time_regex_lenient = new Regex(
@"^(((?<minutes>\d{1,3}):(?<seconds>([0-5]?\d))([:.](?<milliseconds>\d{0,3}))?)(?<selection>\s\([^)]+\))?)(?<suffix>\s-.*)?$",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dunno about hard-coupling to the - blahblahblah syntax here, if we're doing this we may as well allow almost any characters there as long as they follow a word boundary, but sure, i guess we'll see if someone complains

private static readonly Regex time_regex_lenient = new Regex(@"^(((?<minutes>\d{1,3}):(?<seconds>([0-5]?\d))([:.](?<milliseconds>\d{0,3}))?)(?<selection>\s\([^)]+\))?)$", RegexOptions.Compiled);
private static readonly Regex time_regex_lenient = new Regex(
@"^(((?<minutes>\d{1,3}):(?<seconds>([0-5]?\d))([:.](?<milliseconds>\d{0,3}))?)(?<selection>\s\([^)]+\))?)(?<suffix>\s-.*)?$",
RegexOptions.Compiled | RegexOptions.Singleline
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this Singleline thing also seems extraneous but sure

@bdach bdach merged commit 3a30ff7 into ppy:master Jul 29, 2024
13 checks passed
@kadambishreyas
Copy link
Contributor Author

whoops yeah should've just done (.*\s*)* instead

@kadambishreyas kadambishreyas deleted the handle-timestamp-mod-content branch July 29, 2024 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Editor timestamp jump does not handle full mods
4 participants