Skip to content

Commit

Permalink
Use glue's .literal argument
Browse files Browse the repository at this point in the history
Fixes #370
  • Loading branch information
jennybc committed Dec 16, 2021
1 parent aaf7cf1 commit 5c2904c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 19,7 @@ BugReports: https://github.com/r-lib/cli/issues
RoxygenNote: 7.1.2
Depends: R (>= 2.10)
Imports:
glue,
glue (>= 1.5.1.9500),
utils
Suggests:
asciicast,
Expand All @@ -41,7 41,9 @@ Suggests:
tibble,
whoami,
withr
Remotes: r-lib/testthat@fix/snapshot-empty-lines
Remotes:
r-lib/testthat@fix/snapshot-empty-lines,
tidyverse/glue
Config/testthat/edition: 3
Config/Needs/website:
r-lib/asciicast,
Expand Down
3 changes: 2 additions & 1 deletion R/inline.R
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 216,7 @@ clii__inline <- function(app, text, .list) {
.transformer = inline_transformer,
.open = paste0("{", t$values$marker),
.close = paste0(t$values$marker, "}"),
.literal = TRUE,
.trim = TRUE
)
})
Expand Down Expand Up @@ -272,7 273,7 @@ glue_cmd <- function(..., .envir) {
str <- paste0(unlist(list(...), use.names = FALSE), collapse = "")
values <- new.env(parent = emptyenv())
transformer <- make_cmd_transformer(values)
pstr <- glue::glue(str, .envir = .envir, .transformer = transformer, .trim = TRUE)
pstr <- glue::glue(str, .envir = .envir, .transformer = transformer, .literal = TRUE, .trim = TRUE)
glue_delay(
str = post_process_plurals(pstr, values),
values = values
Expand Down

0 comments on commit 5c2904c

Please sign in to comment.