Repository navigation
Sticky RegExp 'y' and RegExp#test delegation - #732
Merged
Merged
Conversation
#492 Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
Owner
|
Since it works only for the global version, need to add empty files with similar names to |
zloirock
reviewed
Dec 17, 2019
| RegExpWrapper | ||
| ); | ||
|
|
||
| if (UNSUPPORTED_Y) setInternalState(result, { sticky: sticky }); |
Owner
There was a problem hiding this comment.
Maybe it would be better to set it only when sticky is true?
zloirock
reviewed
Dec 17, 2019
|
|
||
| module.exports = function (it) { | ||
| return it.sticky; | ||
| }; |
Owner
There was a problem hiding this comment.
Also required stable/regexp/sticky, features/regexp/sticky, the same for RegExp#test and adding them to tests/commonjs.
Owner
|
I think I'll fix it by myself. Thanks! |
zloirock
added a commit
that referenced
this pull request
Dec 17, 2019
Contributor
|
Thanks @cvle for working on my PR, and @zloirock for the quick fixes! |
This was referenced Jan 18, 2020
This was referenced Apr 5, 2020
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.
This PR implements the sticky flag for Regular Expressions and
RegExp#testdelegation toRegExp#exec. It is based on the stale PR from @nicolo-ribaudo (many thanks!!) #492.Changes include:
Co-authored-byinfo in commit)es.string.splitRegExp#testdelegation toRegExp#execTested in a multitude of browser versions using BrowserStack starting from the minimum supported versions of
core-js.My goal was to make https://github.com/projectfluent/fluent.js work in IE11, which I've successfully verified! (also don't forget to use a different markup parser for those trying the same: https://gist.github.com/cvle/67b69517b7d3e83f5de9ccace270415c).