Skip to content

Commit

Permalink
Merge pull request #14 from kbodwin/new-r-version
Browse files Browse the repository at this point in the history
export knit_print method properly
  • Loading branch information
kbodwin authored Jun 16, 2020
2 parents 68d53ff + d3d2807 commit ab67c7d
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
4 changes: 3 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ S3method(flair_lines,default)
S3method(flair_lines,with_flair)
S3method(flair_rx,default)
S3method(flair_rx,with_flair)
S3method(knit_print,with_flair)
S3method(mask_rx,default)
S3method(mask_rx,with_flair)
S3method(print,with_flair)
Expand All @@ -21,7 +22,7 @@ export(flair_input_vals)
export(flair_lines)
export(flair_quick)
export(flair_rx)
export(knit_print.with_flair)
export(is.with_flair)
export(mask)
export(mask_quick)
export(mask_rx)
Expand All @@ -42,6 +43,7 @@ export(with_flair)
export(wrap_html)
import(stringr)
importFrom(glue,glue)
importFrom(knitr,knit_print)
importFrom(magrittr,"%>%")
importFrom(purrr,map)
importFrom(purrr,map2)
Expand Down
11 changes: 11 additions & 0 deletions R/with_flair.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ with_flair <- function(x) {
#' @return "as-is" html output, to be rendered when knitted
#'
#' @importFrom purrr map
#' @importFrom knitr knit_print
#'
#' @method knit_print with_flair
#' @export
knit_print.with_flair <- function(x, ...) {

Expand Down Expand Up @@ -161,3 +163,12 @@ print.with_flair <- function(x, ...) {

}


#' Method check
#'
#' @param x An object
#'
#' @return Whether the object is a \code{with_flair} class object.
#'
#' @export
is.with_flair <- function(x) inherits(x, "with_flair")
17 changes: 17 additions & 0 deletions man/is.with_flair.Rd

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

2 changes: 1 addition & 1 deletion man/knit_print.with_flair.Rd

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

0 comments on commit ab67c7d

Please sign in to comment.