Skip to content

String.prototype.replace works incorrectly with RegExp assertion ?= #412

Open
@YLeight

Description

In case when we have regular expression with assertion ?=, the wrappedReplaceValue, which decorate the original replaceValue function, can't define correct arguments, because the coincidence which was passed to replaceValue function don't match the RegExp pattern and the final arguments have just only two values - the offset of the matched sub-string within the whole string being examined, and the whole string being examined.
There is a certain problem, when whole RegExp don't match with found coincidence, but in fact, there is a coincidence StringPrototype.replace polyfill

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions