View Source Textile (textile v0.1.0)
Render Textile to HTML using Rustextile.
iex> Textile.render """
h2. Textile
* is a _shorthand syntax_ used to generate valid HTML
* is *easy* to read and *easy* to write
* can generate complex pages, including: headings, quotes, lists, tables and figures
Textile integrations are available for "a wide range of platforms":/article/.
"""
"""
<h2>Textile</h2>
<ul>
<li>is a <em>shorthand syntax</em> used to generate valid <span class="caps">HTML</span></li>
<li>is <strong>easy</strong> to read and <strong>easy</strong> to write</li>
<li>can generate complex pages, including: headings, quotes, lists, tables and figures</li>
</ul>
<p>Textile integrations are available for <a href="/article/">a wide range of platforms</a>.</p>
"""
Link to this section Summary
Functions
Render Textile to HTMl.
Link to this section Types
Render options.
Link to this section Functions
Render Textile to HTMl.
The options directly correspond to Rustextile options.
options
Options
:html_kind
Either:html5
or:xhtml
. Defaults to:html5
.:restricted
Escape dangerous HTML entities. Defaultfalse
.:sanitize
Remove dangerous HTML entities. Defaultfalse
.
examples
Examples
iex> Textile.render("<script>foo</script>")
"<p><script>foo</script></p>"
iex> Textile.render("<script>foo</script>", restricted: true)
"<p><script>foo</script></p>"
iex> Textile.render("<script>foo</script>", sanitize: true)
"<p></p>"