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

feat(.collapse): Add collapse argument to epoxy and all downstream functions #115

Merged
merged 6 commits into from
Sep 5, 2023

Conversation

gadenbuie
Copy link
Owner

@gadenbuie gadenbuie commented Sep 3, 2023

Closes #114

epoxy("{letters[1:3]}")
#> a
#> b
#> c
epoxy("{letters[1:3]}", .collapse = " | ")
#> a | b | c

epoxy_latex("<< letters[1:3] >>", .collapse = " \\middot ")
#> a \middot b \middot c

epoxy_html("{{ letters[1:3] }}", .collapse = "<br>")
#> a<br>b<br>c

But note that the html inline transformer already collapses vector expressions.

epoxy_html("{{ li letters[1:3] }}", .collapse = "<br>")
#> <li>a</li><li>b</li><li>c</li>

@codecov
Copy link

codecov bot commented Sep 3, 2023

Codecov Report

Merging #115 (06a96e4) into main (d7fed0e) will increase coverage by 3.34%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #115      +/-   ##
==========================================
+ Coverage   92.61%   95.95%   +3.34%     
==========================================
  Files          11       11              
  Lines         934      939       +5     
==========================================
+ Hits          865      901      +36     
+ Misses         69       38      -31     
Files Changed Coverage Δ
R/engines.R 94.15% <100.00%> (ø)
R/epoxy.R 94.56% <100.00%> (+0.31%) ⬆️

... and 1 file with indirect coverage changes

@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

📕 Preview documentation for this PR has been cleaned up.

@gadenbuie gadenbuie merged commit c7e6992 into main Sep 5, 2023
11 checks passed
@gadenbuie gadenbuie deleted the feat/collapse branch September 5, 2023 14:31
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.

Add .collapse argument
1 participant