diff --git a/R/downlit-md.R b/R/downlit-md.R index 29e96ea..e88b156 100644 --- a/R/downlit-md.R +++ b/R/downlit-md.R @@ -17,7 +17,7 @@ #' greater, otherwise "markdown_github". #' @return `downlit_md_path()` invisibly returns `output_path`; #' `downlit_md_string()` returns a string containing markdown. -#' @examples +#' @examplesIf rlang::is_installed("rmarkdown") #' if (rmarkdown::pandoc_available("1.19")) { #' downlit_md_string("`base::t()`") #' downlit_md_string("`base::t`") diff --git a/man/downlit_md_path.Rd b/man/downlit_md_path.Rd index 867f166..fe1cec6 100644 --- a/man/downlit_md_path.Rd +++ b/man/downlit_md_path.Rd @@ -32,6 +32,7 @@ of a larger pipeline. Needs pandoc 1.19 or later. } \examples{ +\dontshow{if (rlang::is_installed("rmarkdown")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} if (rmarkdown::pandoc_available("1.19")) { downlit_md_string("`base::t()`") downlit_md_string("`base::t`") @@ -40,4 +41,5 @@ downlit_md_string("* `base::t`") # But don't highlight in headings downlit_md_string("## `base::t`") } +\dontshow{\}) # examplesIf} }