to_dovetail: Convert a given block quote to dovetail template

View source: R/to_dovetail.R

to_dovetailR Documentation

Convert a given block quote to dovetail template

Description

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.

Usage

to_dovetail(block, token = "#'")

Arguments

block

a block quote element

token

the token to use to indicate markdown text over code

Value

the block, converted to a code block

Examples

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

carpentries/pegboard documentation built on Nov. 13, 2024, 8:53 a.m.