EVOLUTION-MANAGER
Edit File: markdown-internals.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Escape Rd markup, to avoid interpreting it as markdown</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for escape_rd_for_md {roxygen2}"><tr><td>escape_rd_for_md {roxygen2}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Escape Rd markup, to avoid interpreting it as markdown</h2> <h3>Description</h3> <p>This is needed, if we want to stay compatible with existing markup, even if markdown mode is switched on. Fragile Rd tags (tags that may contain markup that can be picked up by the markdown parser), are replaced by placeholders. After the markdown to Rd conversion is done, the original text is put back in place of the placeholders. </p> <p>It puts back the protected fragile Rd commands into the text after the markdown parsing. </p> <h3>Usage</h3> <pre> escape_rd_for_md(text) unescape_rd_for_md(rd_text, esc_text) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>text</code></td> <td> <p>Input text. Potentially contains Rd and/or markdown markup.</p> </td></tr> <tr valign="top"><td><code>rd_text</code></td> <td> <p>The markdown parsed and interpreted text.</p> </td></tr> <tr valign="top"><td><code>esc_text</code></td> <td> <p>The original escaped text from <code>escape_rd_for_md()</code>.</p> </td></tr> </table> <h3>Details</h3> <p>The list of protected Rd tags is in <code>escaped_for_md</code>. </p> <p>Some Rd macros are treated specially: </p> <ul> <li><p> For <code>if</code>, markdown is only allowed in the second argument. </p> </li> <li><p> For <code>ifelse</code> markdown is allowed in the second and third arguments. </p> </li></ul> <p>See also <code>roclet-rd.R</code> for the list of tags that uses the markdown-enabled parser. Some tags, e.g. <code style="white-space: pre;">@aliases</code>, <code style="white-space: pre;">@backref</code>, etc. only use the standard Roxygen parser. </p> <h3>Value</h3> <p>For <code>escape_rd_for_md</code>: 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. </p> <p>For <code>unescape_rd_for_md</code>: Rd text. </p> <hr /><div style="text-align: center;">[Package <em>roxygen2</em> version 7.2.1 <a href="00Index.html">Index</a>]</div> </body></html>