Skip to content

Commit

Permalink
Removed RegexOptions.Compile flag to avoid .Net 8 compiled regex misb…
Browse files Browse the repository at this point in the history
…ehavior
  • Loading branch information
m4-used-rollout committed Jan 29, 2024
1 parent bba03b2 commit 0a9ebde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TPP.Inputting/Parsing/BareInputParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public BareInputParser(
}
// repeat-group matches lazily '*?' to not match any touchscreen coords coming afterwards for example
string inputSequence = _maxSequenceLength > 1
? $@"^(?<inputset>{inputSetRegex}(?<repeat>[1-{_maxSequenceLength}])*?){{1,{_maxSequenceLength}}}$"
? $@"^(?<inputset>{inputSetRegex}(?<repeat>[1-{_maxSequenceLength}])??){{1,{_maxSequenceLength}}}$"
: $@"^(?<inputset>{inputSetRegex})$";
_regex = new Regex(inputSequence, RegexOptions.Compiled | RegexOptions.IgnoreCase);
_regex = new Regex(inputSequence, RegexOptions.IgnoreCase);
}

public InputSequence? Parse(string text)
Expand Down

0 comments on commit 0a9ebde

Please sign in to comment.