Skip to content

Commit

Permalink
Merge pull request #1478 from olivroy/gtsave
Browse files Browse the repository at this point in the history
Make gtsave return file path invisibly.
  • Loading branch information
rich-iannone authored Nov 4, 2023
2 parents b499967 + ea6b419 commit c56210c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

* The performance of rendering bigger tables as HTML has been improved and is now up to 3 times faster than before (@mgirlich, #1470).

* `gtsave()` now returns the file path invisibly instead of `TRUE` (@olivroy, #1478).

# gt 0.10.0

## Nanoplots
Expand Down
7 changes: 5 additions & 2 deletions R/export.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
#'
#' All other options passed to the appropriate internal saving function.
#'
#' @return Invisibly returns `TRUE` if the export process is successful.
#' @return The file name (invisibly) if the export process is successful.
#'
#' @section Examples:
#'
Expand Down Expand Up @@ -217,8 +217,11 @@ gtsave <- function(
))
}
)
if (!is.null(path)) {
filename <- file.path(path, filename)
}

invisible(TRUE)
invisible(filename)
}

#' Saving function for an HTML file
Expand Down
2 changes: 1 addition & 1 deletion man/gtsave.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c56210c

Please sign in to comment.