Remove 'g' flag from RegExp conversions#750
Merged
tagliala merged 1 commit intoDavyJonesLocker:masterfrom Oct 8, 2018
jaynetics:remove_reg_exp_g_flag
Merged
Remove 'g' flag from RegExp conversions#750tagliala merged 1 commit intoDavyJonesLocker:masterfrom jaynetics:remove_reg_exp_g_flag
tagliala merged 1 commit intoDavyJonesLocker:masterfrom
jaynetics:remove_reg_exp_g_flag
Conversation
1 similar comment
Contributor
|
Thanks. Could this commit represent a breaking change in some use cases? I'm asking because I don't know if I should bump up the major version number |
Contributor
Author
|
It can't affect any validation so I'm not even sure it warrants a Changelog entry. The only breaking change would be if someone uses the generated JSON for other purposes (e.g. substring replacement). |
This file contains hidden or 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
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.
While looking into jaynetics/js_regex#8, I noticed that you manually added the "g" flag back in when you upgraded to js_regex 3.0.0.
The "g" flag is only useful for substring replacement or counting. It can safely be removed for your use case.
It is actually better to remove it. It might cause bugs if the JS ever changes in a certain way (involving re-use of a RegExp as described in jaynetics/js_regex#5).
Cheers!