Skip to content

Commit

Permalink
Strip control character when writing to a file
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Aug 13, 2023
1 parent 1a95892 commit 13e7b0a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Imports:
styler,
withr
Suggests:
fansi,
flow,
knitr,
lobstr,
Expand Down
2 changes: 1 addition & 1 deletion R/boomer-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
#' - `boomer.abbreviate`: Whether to show only the function's name rather than the
#' call when it's entered.
#' - `boomer.path`: A file path to write the output to. By default, output is written
#' to the console (standard output).
#' to the console (standard output). Requires the fansi package.
#'
"_PACKAGE"
2 changes: 1 addition & 1 deletion R/wrap.R
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ append_lines <- function(x, path) {
writeLines(x)
} else {
con <- withr::local_connection(file(path, "at"))
writeLines(x, con = con)
writeLines(fansi::strip_sgr(x), con = con)
}
}

Expand Down

0 comments on commit 13e7b0a

Please sign in to comment.