-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
RegexBuilder Options Port: Enable Overrides for RaBuilder #132
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
robinst
reviewed
Mar 3, 2024
robinst
approved these changes
Oct 12, 2024
@robinst I'm not sure if that coverage failure with line 505 is an issue? I'm not entirely sure what its looking for there. |
Seems like tarpaulin (the tool we use for coverage) doesn't analyze that correctly. (Maybe bumping the version would help, not sure.) |
Thanks, merged! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Case Insensitive Builder Feature Port
This is a small add-in to allow for options to be passed in as boolean values and mutate the
Config
through theRegexBuilder
. This is primarily to align with the standard Regex crate for their own RegexBuilder.Changes
RegexOptions
to keep a state ofregex_automata::utils::syntax::Config
internally to disseminate the proper flag overridesRegexbuilder
calledcase_insensitive
- This will allow for forcing of a flag if not present in the raw str
RaRegexBuilder
which will consume this option using.syntax( ... )
lib.rs
to make sure the override works as intendedExamples
Currently, we can write in flags into the raw string like this:
This change is to enable builder functionality like this:
Notes
Currently,
fancy-regex
doesn't support flags such as(?-i)
and that is likely something we should enable in the future. The correlation of that type of flag to this feature add ties to the buildercase_insensitive
setter method. This method should override any raw input data.