EVOLUTION-MANAGER
Edit File: renderMarkdown.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: Render markdown to an HTML fragment</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 renderMarkdown {markdown}"><tr><td>renderMarkdown {markdown}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Render markdown to an HTML fragment</h2> <h3>Description</h3> <p><code>renderMarkdown</code> transforms the <em>markdown</em> text provided by the user in either the <code>file</code> or <code>text</code> variable. The transformation is either written to the <code>output</code> file or returned to the user. The default rendering target is "HTML". </p> <h3>Usage</h3> <pre> renderMarkdown(file, output = NULL, text = NULL, renderer = "HTML", renderer.options = NULL, extensions = getOption("markdown.extensions"), encoding = "UTF-8") </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>file</code></td> <td> <p>a character string giving the pathname of the file to read from. If it is omitted from the argument list, then it is presumed that the <code>text</code> argument will be used instead.</p> </td></tr> <tr valign="top"><td><code>output</code></td> <td> <p>a character string giving the pathname of the file to write to. If it is omitted (<code>NULL</code>), then it is presumed that the user expects the results returned as a <code>character</code> vector.</p> </td></tr> <tr valign="top"><td><code>text</code></td> <td> <p>a character vector containing the <em>markdown</em> text to transform (each element of this vector is treated as a line in a file).</p> </td></tr> <tr valign="top"><td><code>renderer</code></td> <td> <p>the name of the renderer that will be used to transform the <code>file</code> or <code>text</code>.</p> </td></tr> <tr valign="top"><td><code>renderer.options</code></td> <td> <p>options that are passed to the renderer. For <code>HTML</code> renderer options see <code><a href="markdownHTMLOptions.html">markdownHTMLOptions</a></code>.</p> </td></tr> <tr valign="top"><td><code>extensions</code></td> <td> <p>options that are passed to the <em>markdown</em> engine. See <code><a href="markdownExtensions.html">markdownExtensions</a></code>.</p> </td></tr> <tr valign="top"><td><code>encoding</code></td> <td> <p>ignored (always assumes the file is encoded in UTF-8).</p> </td></tr> </table> <h3>Details</h3> <p><span class="pkg">markdown</span> uses (and ships with) the popular Sundown library provided by GitHub. C stubs are available to implement new renderers. </p> <h3>Value</h3> <p><code>renderMarkdown</code> returns NULL invisibly when output is to a file, and either <code>character</code> (with the UTF-8 encoding) or <code>raw</code> vector depending on the renderer output type. </p> <h3>See Also</h3> <p><code><a href="markdownExtensions.html">markdownExtensions</a></code>, <code><a href="markdownHTMLOptions.html">markdownHTMLOptions</a></code>, <code><a href="markdownToHTML.html">markdownToHTML</a></code>. </p> <p>For a description of the original <em>markdown</em> version: <a href="http://daringfireball.net/projects/markdown/">http://daringfireball.net/projects/markdown/</a> </p> <p>The original Sundown library on github: <a href="https://github.com/vmg/sundown">https://github.com/vmg/sundown</a> </p> <p>C stubs for writing new renders are in inst/include/markdown_rstubs.[ch]. </p> <h3>Examples</h3> <pre> (renderMarkdown(text = "Hello World!")) # a few corner cases (renderMarkdown(text = character(0))) (renderMarkdown(text = "")) </pre> <hr /><div style="text-align: center;">[Package <em>markdown</em> version 1.1 <a href="00Index.html">Index</a>]</div> </body></html>