R/knit_print.R

Defines functions knit_print.fontawesome

Documented in knit_print.fontawesome

#' Safely print any FontAwesome in R Markdown
#' @description This facilitates printing of
#' the FontAwesome icon within R Markdown.
#' @param x an object containing the class
#' \code{fontawesome}.
#' @keywords internal
knit_print.fontawesome <- function(x, ...) { # nocov start

  if (requireNamespace("knitr", quietly = TRUE)) {

    knitr::knit_print(as.character(x), ...)
  }
} # nocov end
rstudio/fontawesome documentation built on Sept. 3, 2019, 4:06 p.m.