Learn R Programming

roxygen2 (version 8.1.0)

escape_rd_for_md: Escape fragile Rd tags

Description

escape_rd_for_md() replaces fragile Rd tags with placeholders, to avoid interpreting them as markdown. unescape_rd_for_md() puts the original text back in place of the placeholders after the markdown parsing is done. The fragile tags are listed in escaped_for_md. A fragile tag is protected together with all of its brace arguments, so markdown is never interpreted inside them.

Usage

escape_rd_for_md(text)

unescape_rd_for_md(rd_text, esc_text)

Value

  • escape_rd_for_md: a "safe" version of the input text, where each fragile Rd tag is replaced by a placeholder. The original text is added as an attribute for each placeholder.

  • unescape_rd_for_md: the original Rd text.

Arguments

text

Input text. Potentially contains Rd and/or markdown markup.

rd_text

The markdown parsed and interpreted text.

esc_text

The original escaped text from escape_rd_for_md().