diff --git a/R/printers.R b/R/printers.R index 3e042de1..e5f17cdd 100644 --- a/R/printers.R +++ b/R/printers.R @@ -85,7 +85,7 @@ htmltools_value <- function(x, ft.align = NULL, ft.shadow = NULL, #' ) #' } #' } -flextable_to_rmd <- function(x, print = TRUE, ...) { +flextable_to_rmd <- function(x, ...) { is_bookdown <- is_in_bookdown() is_quarto <- is_in_quarto() @@ -104,11 +104,9 @@ flextable_to_rmd <- function(x, print = TRUE, ...) { useBytes = TRUE) z <- knit_child(input = tmp_file, envir = environment(), quiet = TRUE) - if (print) { - cat(z, sep = '\n') - } + cat(z, sep = '\n') - invisible(paste0(z, collapse = "\n")) + invisible("") } #' @export diff --git a/man/flextable_to_rmd.Rd b/man/flextable_to_rmd.Rd index c5133299..c851be35 100644 --- a/man/flextable_to_rmd.Rd +++ b/man/flextable_to_rmd.Rd @@ -4,7 +4,7 @@ \alias{flextable_to_rmd} \title{Knitr rendering in loops and if statements} \usage{ -flextable_to_rmd(x, print = TRUE, ...) +flextable_to_rmd(x, ...) } \arguments{ \item{x}{a flextable object}