Skip to content
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

Handle multiple named groups in wrapRegExp replace() #15090

Merged
merged 1 commit into from Oct 29, 2022
Merged

Handle multiple named groups in wrapRegExp replace() #15090

merged 1 commit into from Oct 29, 2022

Commits on Oct 28, 2022

  1. Handle multiple named groups in wrapRegExp replace()

    Previously, the [Symbol.replace] implementation in BabelRegExp assumed
    that the groups object property values were only numbers. With the
    duplicate named capturing groups plugin, they can be arrays of numbers
    as well.
    
    In the case of a duplicate named capturing group, the replacement
    pattern $<name> can be replaced by the concatenation of the pattern
    indices that have that name: e.g., $1$2.
    ptomato committed Oct 28, 2022
    Copy the full SHA
    7968d4a View commit details
    Browse the repository at this point in the history