EVOLUTION-MANAGER
Edit File: downlit_md_path.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: Syntax highlight and link a md document</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 downlit_md_path {downlit}"><tr><td>downlit_md_path {downlit}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Syntax highlight and link a md document</h2> <h3>Description</h3> <p><code style="white-space: pre;">downlit_md_*</code> works by traversing the markdown AST generated by Pandoc. It applies <code><a href="highlight.html">highlight()</a></code> to <code>CodeBlock</code>s and <code><a href="autolink.html">autolink()</a></code> to inline <code>Code</code>. </p> <p>Use <code>downlit_md_path()</code> to transform a file on disk; use <code>downlit_md_string()</code> to transform a string containing markdown as part of a larger pipeline. </p> <p>Needs pandoc 1.19 or later. </p> <h3>Usage</h3> <pre> downlit_md_path(in_path, out_path, format = NULL) downlit_md_string(x, format = NULL) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>in_path, out_path</code></td> <td> <p>Input and output paths for markdown file.</p> </td></tr> <tr valign="top"><td><code>format</code></td> <td> <p>Pandoc format; defaults to "gfm" if you have pandoc 2.0.0 or greater, otherwise "markdown_github".</p> </td></tr> <tr valign="top"><td><code>x</code></td> <td> <p>A string containing markdown.</p> </td></tr> </table> <h3>Value</h3> <p><code>downlit_md_path()</code> invisibly returns <code>output_path</code>; <code>downlit_md_string()</code> returns a string containing markdown. </p> <h3>Examples</h3> <pre> if (rmarkdown::pandoc_available("1.19")) { downlit_md_string("`base::t()`") downlit_md_string("`base::t`") downlit_md_string("* `base::t`") # But don't highlight in headings downlit_md_string("## `base::t`") } </pre> <hr /><div style="text-align: center;">[Package <em>downlit</em> version 0.4.2 <a href="00Index.html">Index</a>]</div> </body></html>