to_dovetail | R Documentation |
The dovetail package allows people to write block quotes as code blocks formatted in roxygen2 syntax. This internal function takes a block quote element, elevates all the child elements, converts the block quote to a code block and uses a custom xslt stylesheet to render the children of the block to roxygen-formatted text and code.
to_dovetail(block, token = "#'")
block |
a block quote element |
token |
the token to use to indicate markdown text over code |
the block, converted to a code block
## Not run:
frg <- Lesson$new(lesson_fragment())
blo <- frg$episodes$`14-looping-data-sets.md`$get_blocks()[[2]]
to_dovetail(blo)
cat(xml2::xml_text(blo))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.