R/spec-pre-knit.R

Defines functions spec_pre_knit

spec_pre_knit <- function(code_download_html = NULL) {
  if (is.null(code_download_html)) {
    return(NULL)
  }
  function(input, ...) {
    writeLines(
      htmltools::renderTags(download_rmd_button(input, align = "right"))$html,
      code_download_html
    )
  }
}
atusy/minidown documentation built on Feb. 19, 2022, 10:34 a.m.