md_to_xml: Convert markdown to XML

View source: R/add_md.R

md_to_xmlR Documentation

Convert markdown to XML

Description

Convert markdown to XML

Usage

md_to_xml(md)

Arguments

md

a character vector of markdown text

Value

an XML nodeset of the markdown text

Examples

if (requireNamespace("withr")) {

withr::with_namespace("tinkr", {
md_to_xml(c(
  "## This is a new section of markdown",
  "",
  "Each new element",
  "Is converted to a new line of markdown text",
  "",
  "```{r code-example, echo = FALSE}",
  "cat('code blocks work well here, too')",
  "```",
  "",
  "Neat, right?"
))
})

}

ropensci/tinkr documentation built on April 23, 2024, 9:41 a.m.