Skip to content

Commit

Permalink
Use deparse1() instead of paste(deparse(), collapse = " "). (#2761)
Browse files Browse the repository at this point in the history
  • Loading branch information
jplecavalier authored Aug 17, 2024
1 parent 6ecf766 commit 515efc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/rd-example.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ process_conditional_examples <- function(rd) {
if (isTRUE(cond)) {
remove <- c(remove, idx, idx + 1L)
} else {
cond_expr_str <- paste(deparse(cond_expr), collapse = " ")
cond_expr_str <- deparse1(cond_expr)
is_false <- cond_expr_str == "FALSE"
if (!is_false) {
new_cond <- paste0("if (FALSE) { # ", cond_expr_str)
Expand Down

0 comments on commit 515efc4

Please sign in to comment.