Skip to content

Commit

Permalink
Merge pull request #816 from tidyverse/f-format-print-pillar
Browse files Browse the repository at this point in the history
- Export format() and print() only if pillar doesn't (#816).
  • Loading branch information
krlmlr committed Oct 1, 2020
2 parents e0f2811 + d512630 commit 1f785b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ S3method(as_tibble,matrix)
S3method(as_tibble,poly)
S3method(as_tibble,table)
S3method(as_tibble,ts)
S3method(format,tbl)
S3method(format,trunc_mat)
S3method(format_v,character)
S3method(format_v,default)
S3method(format_v,factor)
S3method(format_v,list)
S3method(print,tbl)
S3method(print,trunc_mat)
S3method(quote_n,character)
S3method(quote_n,default)
Expand Down
4 changes: 2 additions & 2 deletions R/print.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
#' @name formatting
NULL

# If needed, exported in .onLoad() via replace_if_pillar_has()
#' @rdname formatting
#' @export
print.tbl <- function(x, ..., n = NULL, width = NULL, n_extra = NULL) {
cli::cat_line(format(x, ..., n = n, width = width, n_extra = n_extra))
invisible(x)
Expand All @@ -82,8 +82,8 @@ print.tbl <- function(x, ..., n = NULL, width = NULL, n_extra = NULL) {
#' @keywords internal
NULL

# If needed, exported in .onLoad() via replace_if_pillar_has()
#' @rdname formatting
#' @export
format.tbl <- function(x, ..., n = NULL, width = NULL, n_extra = NULL) {
mat <- trunc_mat(x, n = n, width = width, n_extra = n_extra)
format(mat)
Expand Down

0 comments on commit 1f785b4

Please sign in to comment.