Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR aims to improve the performance Custom ID template matching without sacrificing any flexibility and introduce some QOL changes. Under-the-hood pattern generation logic is updated to reduce the chance of creating patterns with catastrophic backtracking.
The IF template generation logic now accepts Regex length quantifiers as wild cards to enable users to further improve the match evaluation performance. Any combination of
*
,{7,4}
,{5}
,{6,}
can be used in Custom ID templates.\
character can now be used to escape any of the aforementioned meta-characters.And finally, since its not possible to create Regex patterns with optimal performance without knowing the intentions of the end-users and not sacrifice flexibility, you can now create your own regex patterns to suit your needs and force IF to use those patterns by setting the
TreatNameAsRegex
property of[ComponentInteractionAttribute]
and[ModalInteractionAttribute]
. Capturing groups can be used to inject variables into methods. You can use non-capturing or atomic groups to skip unneeded Custom ID variables and also increase efficiency.