add_html_tags: Add HTML tags to a source

View source: R/add_html_tags.R

add_html_tagsR Documentation

Add HTML tags to a source

Description

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

Usage

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

Arguments

x

A character vector with the source

context

Optionally, lines to pass the contextClass

codeClass, codeValueClass, idClass, sectionClass, uidClass, contextClass, utteranceClass

The classes to use for, respectively, codes, code values, class instance identifiers (such as case identifiers or coder identifiers), section breaks, utterance identifiers, context, 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.

Examples

### Add tags to a mini example source
add_html_tags("[[cid=participant1]]
This is something this participant may have said.
Just like this. [[thisIsACode]]
---paragraph-break---
And another utterance.");

rock documentation built on Dec. 28, 2022, 1:55 a.m.