gadenbuie / epoxy

Extra-strength glue engines for R Markdown, Quarto, and Shiny

Home Page:https://pkg.garrickadenbuie.com/epoxy/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add `.squote` and `.dquote` to `epoxy_style_inline()`

gadenbuie opened this issue · comments

library(epoxy)
abc <- c("a", "b", "c")

epoxy(
  "{.squote abc} or {.dquote abc}",
  .style = epoxy_style_inline(
    squote = \(x) sQuote(x, q = getOption("useFancyQuotes", 0)),
    dquote = \(x) dQuote(x, q = getOption("useFancyQuotes", 0))
  )
)
#> 'a' or "a"
#> 'b' or "b"
#> 'c' or "c"