Skip to content

Commit db21cb6

Browse files
committed
webshot 0.1.1 introduced a quiet arg
it is 1.5 years old so it should be ok to require it
1 parent bfd8e78 commit db21cb6

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Suggests:
3333
rsvg (>= 2.0),
3434
testthat (>= 3.0.0),
3535
vdiffr (>= 1.0.2),
36-
webshot2 (>= 0.1.0)
36+
webshot2 (>= 0.1.1)
3737
Config/testthat/edition: 3
3838
Encoding: UTF-8
3939
Roxygen: list(markdown = TRUE)

R/gt_nfl.R

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -341,11 +341,7 @@ gt_render_image <- function(gt_tbl, ...){
341341
temp_file <- tempfile(fileext = ".png")
342342
# webshot2 sends a message that can't be suppressed with suppressMessages()
343343
# so we capture the output and return it invisibly
344-
output <- gt::gtsave(gt_tbl, temp_file, ...) |>
345-
utils::capture.output(type = "message") |>
346-
invisible()
347-
# if the output is something other than the annoying webshot message, print it
348-
if(!grepl("screenshot completed", output)) print(output)
344+
output <- gt::gtsave(gt_tbl, temp_file, quiet = TRUE, ...)
349345
# get rid of the file when function exits
350346
on.exit(unlink(temp_file))
351347
# remove margin from plots so we render the table only

0 commit comments

Comments
 (0)