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
    )
  }
}

Try the minidown package in your browser

Any scripts or data that you put into this service are public.

minidown documentation built on March 18, 2022, 7:29 p.m.