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

text_case_match() now works with tab_spanner() + .replace = "all" #1823

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

olivroy
Copy link
Collaborator

@olivroy olivroy commented Aug 12, 2024

Summary

Before the PR, we would get

exibble %>% gt() %>% tab_spanner("the boring spanner", columns = c(num, date)) %>%
    text_case_match(
      "the boring spanner" ~ "awesome spanner",
      .replace = "all",
      .locations = cells_column_spanners()
    )
#> Error in `dplyr::case_match()` at gt/R/text_transform.R:414:9:
#> ! Can't combine `..1 (right)` <character> and `.default` <list>.

Now, it works as expected!

Checklist

Copy link
Member

@rich-iannone rich-iannone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rich-iannone rich-iannone merged commit 466abe3 into rstudio:master Aug 13, 2024
12 checks passed
@olivroy olivroy deleted the tab-spanner-case-match branch August 13, 2024 12:21
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.

2 participants