sprinkle_html_preserve: Change the HTML Preserve Property in a Dust Table

View source: R/sprinkle_html_preserve.R

sprinkle_html_preserveR Documentation

Change the HTML Preserve Property in a Dust Table

Description

By default pixiedust makes use of htmltools::htmlPreserve to prevent certain symbols from rendering in unintended ways based on some not-very-well-understood-by-the-author issues. This property controls whether the preservation is used or not.

Usage

sprinkle_html_preserve(
  x,
  html_preserve = getOption("pixie_html_preserve", TRUE),
  ...
)

## Default S3 method:
sprinkle_html_preserve(
  x,
  html_preserve = getOption("pixie_html_preserve", TRUE),
  ...
)

## S3 method for class 'dust_list'
sprinkle_html_preserve(
  x,
  html_preserve = getOption("pixie_html_preserve", TRUE),
  ...
)

Arguments

x

An object of class dust

html_preserve

logical(1) indicating if the table is being produced in a htmltools::htmlPreserve environment.

...

Additional arguments to pass to other methods. Currently ignored.

Functional Requirements

  1. Change the html_preserve attribute of the dust object.

  2. Cast an error if x is not a dust object.

  3. Cast an error if html_preserve is not logical(1).

Author(s)

Benjamin Nutter

See Also

dust, sprinkle, htmlPreserve


nutterb/pixiedust documentation built on Oct. 17, 2023, 9:20 a.m.