Skip to content

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

Merged
rich-iannone merged 1 commit intorstudio:masterfrom
olivroy:tab-spanner-case-match
Aug 13, 2024
Merged

text_case_match() now works with tab_spanner() + .replace = "all"#1823
rich-iannone merged 1 commit intorstudio:masterfrom
olivroy:tab-spanner-case-match

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

@olivroy olivroy requested a review from rich-iannone August 12, 2024 20:14
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
@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

Comments