Skip to content

Handle named strings in str_replace_all() callbacks - #623

Open
M-Colley wants to merge 1 commit into
tidyverse:mainfrom
M-Colley:fix/named-function-replacements
Open

M-Colley wants to merge 1 commit into
tidyverse:mainfrom
M-Colley:fix/named-function-replacements

Conversation

@M-Colley

Copy link
Copy Markdown

Fixes #595.

A named input with multiple matches now passes each match to the replacement function with its input label. The result preserves input names when the pattern is scalar or the input and pattern have equal lengths, consistent with character replacements.

The regression failed on main and passed with the patch. On Windows, the package tests passed with the existing encoding-conversion skip, and R CMD check --no-manual --ignore-vignettes returned OK.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

str_replace_all errors with multiple matches, a named string vector, and a function replacement

1 participant