This function adds HTML tags to a source to allow pretty printing/viewing.

add_html_tags(
  x,
  codeClass = rock::opts$get(codeClass),
  idClass = rock::opts$get(idClass),
  sectionClass = rock::opts$get(sectionClass),
  uidClass = rock::opts$get(uidClass),
  utteranceClass = rock::opts$get(utteranceClass)
)

Arguments

x

A character vector with the source

codeClass, idClass, sectionClass, uidClass, utteranceClass

The classes to use for, respectively, codes, identifiers (such as case identifiers or coder identifiers), section breaks, utterance identifiers, and full utterances. All <span> elements except for the full utterances, which are placed in <div> elements.

Value

The character vector with the replacements made.