Skip to content

Commit

Permalink
Merge pull request #1689 from rstudio/print-html-table-inline
Browse files Browse the repository at this point in the history
Ensure tables print correctly when called from inline code in .qmd/.Rmd
  • Loading branch information
rich-iannone authored Jun 6, 2024
2 parents 135dcdd + 216c642 commit 0382e80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/print.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ print.gt_group <- function(x, ..., view = interactive()) {
#'
#' @keywords internal
#' @noRd
knit_print.gt_tbl <- function(x, ...) {
knit_print.gt_tbl <- function(x, ..., inline = FALSE) {

# TODO: Add print method for interactive HTML table

Expand All @@ -110,7 +110,7 @@ knit_print.gt_tbl <- function(x, ...) {
}

# Use `knit_print()` to print in a code chunk
knitr::knit_print(x, ...)
knitr::knit_print(x, ..., inline = FALSE)
}

#' Knit print a collection of **gt** tables
Expand Down

0 comments on commit 0382e80

Please sign in to comment.