Skip to contents

Recursively converts the keys at the specified pluck locations of a survey configuration from Markdown to HTML using commonmark::markdown_html(). Keys to be converted must be of (nested) type character.

Usage

htmlize_survey_config(
  survey_config,
  ...,
  rm_p = FALSE,
  hard_line_breaks = FALSE,
  smart_punctuation = TRUE,
  strip_footnotes = TRUE,
  normalize = TRUE,
  extensions = c("table", "strikethrough", "tasklist")
)

Arguments

survey_config

Survey configuration list as returned by read_survey_config().

...

Pluck locations to convert to HTML. All (sub)keys targeted here must be of type character. Dynamic dots are supported.

rm_p

Whether or not to omit the outer <p> tag when converting values to HTML.

hard_line_breaks

Whether or not to interpret all newlines within a paragraph as hard line breaks instead of spaces. This setting conforms to Pandoc's hard_line_breaks extension.

smart_punctuation

Whether or not to enable smart punctation conforming to Pandoc's smart extension which converts straight quotes to curly quotes, --- to an em-dash (—), -- to an en-dash (–), and ... to ellipses (…). It also replaces regular spaces after certain abbreviations such as Mr. with non-breaking spaces.

strip_footnotes

Whether or not to remove Markdown footnotes.

normalize

Consolidate adjacent text nodes.

extensions

Enables Github extensions. Can be TRUE (all) FALSE (none) or a character vector with a subset of available extensions.

Value

survey_config with the specified keys recursively converted to HTML text.

See also

Other survey preparation functions: read_survey_config()