Edit file File name : README_rdoc.html Content :<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>README - RedCloth</title> <script type="text/javascript"> var rdoc_rel_prefix = "./"; var index_rel_prefix = "./"; </script> <script src="./js/navigation.js" defer></script> <script src="./js/search.js" defer></script> <script src="./js/search_index.js" defer></script> <script src="./js/searcher.js" defer></script> <script src="./js/darkfish.js" defer></script> <link href="./css/fonts.css" rel="stylesheet"> <link href="./css/rdoc.css" rel="stylesheet"> <body id="top" role="document" class="file"> <nav role="navigation"> <div id="project-navigation"> <div id="home-section" role="region" title="Quick navigation" class="nav-section"> <h2> <a href="./index.html" rel="home">Home</a> </h2> <div id="table-of-contents-navigation"> <a href="./table_of_contents.html#pages">Pages</a> <a href="./table_of_contents.html#classes">Classes</a> <a href="./table_of_contents.html#methods">Methods</a> </div> </div> <div id="search-section" role="search" class="project-section initially-hidden"> <form action="#" method="get" accept-charset="utf-8"> <div id="search-field-wrapper"> <input id="search-field" role="combobox" aria-label="Search" aria-autocomplete="list" aria-controls="search-results" type="text" name="search" placeholder="Search" spellcheck="false" title="Type to search, Up and Down to navigate, Enter to load"> </div> <ul id="search-results" aria-label="Search Results" aria-busy="false" aria-expanded="false" aria-atomic="false" class="initially-hidden"></ul> </form> </div> </div> <div class="nav-section"> <h3>Table of Contents</h3> <ul class="link-list" role="directory"> <li><a href="#label-RedCloth+-+Textile+parser+for+Ruby">RedCloth - Textile parser for Ruby</a> <li><a href="#label-RedCloth">RedCloth</a> <li><a href="#label-Attention+-+Deprecating+JRuby+and+Windows+support+in+version+4.3">Attention - Deprecating JRuby and Windows support in version 4.3</a> <li><a href="#label-Installing">Installing</a> <li><a href="#label-Compiling">Compiling</a> <li><a href="#label-Supported+platforms">Supported platforms</a> <li><a href="#label-Bugs">Bugs</a> <li><a href="#label-Using+RedCloth">Using RedCloth</a> <li><a href="#label-What+is+Textile-3F">What is Textile?</a> <li><a href="#label-Sample+Textile+Text">Sample Textile Text</a> <li><a href="#label-Writing+Textile">Writing Textile</a> <li><a href="#label-Quick+Phrase+Modifiers">Quick Phrase Modifiers</a> <li><a href="#label-Links">Links</a> <li><a href="#label-Images">Images</a> <li><a href="#label-Defining+Acronyms">Defining Acronyms</a> <li><a href="#label-Adding+Tables">Adding Tables</a> </ul> </div> <div id="project-metadata"> <div id="fileindex-section" class="nav-section"> <h3>Pages</h3> <ul class="link-list"> <li><a href="./README_rdoc.html">README</a> <li><a href="./lib/tasks/pureruby_rake.html">pureruby.rake</a> </ul> </div> </div> </nav> <main role="main" aria-label="Page README.rdoc"> <h1 id="label-RedCloth+-+Textile+parser+for+Ruby"><a href="RedCloth.html"><code>RedCloth</code></a> - Textile parser for Ruby<span><a href="#label-RedCloth+-+Textile+parser+for+Ruby">¶</a> <a href="#top">↑</a></span></h1> <dl class="rdoc-list note-list"><dt>Homepage <dd> <p><a href="http://redcloth.org">redcloth.org</a></p> </dd><dt>Maintainer <dd> <p>Joshua Siler <a href="https://github.com/joshuasiler">github.com/joshuasiler</a></p> </dd><dt>Author <dd> <p>Jason Garber</p> </dd><dt>Copyright <dd> <p>© 2011 Jason Garber</p> </dd><dt>License <dd> <p>MIT</p> </dd></dl> <p><a href="https://travis-ci.org/jgarber/redcloth"><img src="https://travis-ci.org/jgarber/redcloth.svg" /></a> <a href="https://codeclimate.com/github/jgarber/redcloth"><img src="https://codeclimate.com/github/jgarber/redcloth/badges/gpa.svg" /></a></p> <p>(See <a href="http://redcloth.org/textile">redcloth.org/textile</a>/ for a Textile reference.)</p> <h1 id="label-RedCloth"><a href="RedCloth.html"><code>RedCloth</code></a><span><a href="#label-RedCloth">¶</a> <a href="#top">↑</a></span></h1> <p><a href="RedCloth.html"><code>RedCloth</code></a> is a Ruby library for converting Textile into HTML.</p> <h2 id="label-Attention+-+Deprecating+JRuby+and+Windows+support+in+version+4.3">Attention - Deprecating JRuby and Windows support in version 4.3<span><a href="#label-Attention+-+Deprecating+JRuby+and+Windows+support+in+version+4.3">¶</a> <a href="#top">↑</a></span></h2> <p>In order to prioritize merging a fix for the long standing vulnerability <strong>CVE-2012-6684</strong>, our <a href="https://github.com/joshuasiler">new maintainer</a> has elected to stop maintaining the precompiled versions for Windows and JRuby. </p> <h2 id="label-Installing">Installing<span><a href="#label-Installing">¶</a> <a href="#top">↑</a></span></h2> <p><a href="RedCloth.html"><code>RedCloth</code></a> can be installed via RubyGems:</p> <pre class="ruby"><span class="ruby-identifier">gem</span> <span class="ruby-identifier">install</span> <span class="ruby-constant">RedCloth</span> </pre> <h2 id="label-Compiling">Compiling<span><a href="#label-Compiling">¶</a> <a href="#top">↑</a></span></h2> <p>If you just want to use <a href="RedCloth.html"><code>RedCloth</code></a>, you do NOT need to build/compile it. It is compiled from C sources automatically when you install the gem on the ruby platform. Precompiled binary gems are provided for JRuby and Win32 platforms prior to version 4.3.</p> <p><a href="RedCloth.html"><code>RedCloth</code></a> can be compiled with <code>rake compile</code>. Ragel 6.3 or greater is required. Again, Ragel is NOT needed to simply use <a href="RedCloth.html"><code>RedCloth</code></a>.</p> <h3 id="label-Supported+platforms">Supported platforms<span><a href="#label-Supported+platforms">¶</a> <a href="#top">↑</a></span></h3> <p>By default, the rake compile task builds a native C extension (MRI 1.8 or 1.9). A pure Ruby version can also be generated, but it's super slow and Ruby 1.8-only, and doesn't support multi-byte characters. </p> <p>The RedCloth::EXTENSION_LANGUAGE constant indicates in which language your copy of <a href="RedCloth.html"><code>RedCloth</code></a> is compiled.</p> <h2 id="label-Bugs">Bugs<span><a href="#label-Bugs">¶</a> <a href="#top">↑</a></span></h2> <p>Please submit bugs as issues to this repo.</p> <h2 id="label-Using+RedCloth">Using <a href="RedCloth.html"><code>RedCloth</code></a><span><a href="#label-Using+RedCloth">¶</a> <a href="#top">↑</a></span></h2> <p><a href="RedCloth.html"><code>RedCloth</code></a> is simply an extension of the String class that can handle Textile formatting. Use it like a String and output HTML with its RedCloth#to_html method.</p> <p>Simple use:</p> <pre class="ruby"><span class="ruby-identifier">text</span> = <span class="ruby-string">"This is *my* text."</span> <span class="ruby-constant">RedCloth</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">text</span>).<span class="ruby-identifier">to_html</span> </pre> <p>Multi-line example:</p> <pre class="ruby"><span class="ruby-identifier">doc</span> = <span class="ruby-constant">RedCloth</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier"><<EOD</span> <span class="ruby-value">h2. Test document Just a simple test. </span><span class="ruby-identifier">EOD</span> <span class="ruby-identifier">puts</span> <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">to_html</span> </pre> <h2 id="label-What+is+Textile-3F">What is Textile?<span><a href="#label-What+is+Textile-3F">¶</a> <a href="#top">↑</a></span></h2> <p>Textile is a simple formatting style for text documents, loosely based on some HTML conventions.</p> <h2 id="label-Sample+Textile+Text">Sample Textile Text<span><a href="#label-Sample+Textile+Text">¶</a> <a href="#top">↑</a></span></h2> <pre>h2. This is a title h3. This is a subhead This is a bit of paragraph. bq. This is a blockquote.</pre> <h1 id="label-Writing+Textile">Writing Textile<span><a href="#label-Writing+Textile">¶</a> <a href="#top">↑</a></span></h1> <p>A Textile document consists of paragraphs. Paragraphs can be specially formatted by adding a small instruction to the beginning of the paragraph.</p> <pre>h3. Header 3. bq. Blockquote. # Numeric list. * Bulleted list.</pre> <h2 id="label-Quick+Phrase+Modifiers">Quick Phrase Modifiers<span><a href="#label-Quick+Phrase+Modifiers">¶</a> <a href="#top">↑</a></span></h2> <p>Quick phrase modifiers are also included, to allow formatting of small portions of text within a paragraph.</p> <pre>_emphasis_ __italicized__ *strong* **bold** ??citation?? -deleted text- +inserted text+ ^superscript^ ~subscript~ @code@ %(classname)span% ==notextile== (leave text alone)</pre> <h2 id="label-Links">Links<span><a href="#label-Links">¶</a> <a href="#top">↑</a></span></h2> <p>To make a hypertext link, put the link text in “quotation marks” followed immediately by a colon and the URL of the link.</p> <p>Optional: text in (parentheses) following the link text, but before the closing quotation mark, will become a title attribute for the link, visible as a tool tip when a cursor is above it.</p> <p>Example:</p> <pre>"This is a link (This is a title)":http://www.textism.com</pre> <p>Will become:</p> <pre><a href="http://www.textism.com" title="This is a title">This is a link</a></pre> <h2 id="label-Images">Images<span><a href="#label-Images">¶</a> <a href="#top">↑</a></span></h2> <p>To insert an image, put the URL for the image inside exclamation marks.</p> <p>Optional: text that immediately follows the URL in (parentheses) will be used as the Alt text for the image. Images on the web should always have descriptive Alt text for the benefit of readers using non-graphical browsers.</p> <p>Optional: place a colon followed by a URL immediately after the closing ! to make the image into a link.</p> <p>Example:</p> <pre>!http://www.textism.com/common/textist.gif(Textist)!</pre> <p>Will become:</p> <pre><img src="http://www.textism.com/common/textist.gif" alt="Textist" /></pre> <p>With a link:</p> <pre>!/common/textist.gif(Textist)!:http://textism.com</pre> <p>Will become:</p> <pre><a href="http://textism.com"><img src="/common/textist.gif" alt="Textist" /></a></pre> <h2 id="label-Defining+Acronyms">Defining Acronyms<span><a href="#label-Defining+Acronyms">¶</a> <a href="#top">↑</a></span></h2> <p>HTML allows authors to define acronyms via the tag. The definition appears as a tool tip when a cursor hovers over the acronym. A crucial aid to clear writing, this should be used at least once for each acronym in documents where they appear.</p> <p>To quickly define an acronym in Textile, place the full text in (parentheses) immediately following the acronym.</p> <p>Example:</p> <pre class="ruby"><span class="ruby-constant">ACLU</span>(<span class="ruby-constant">American</span> <span class="ruby-constant">Civil</span> <span class="ruby-constant">Liberties</span> <span class="ruby-constant">Union</span>) </pre> <p>Will become:</p> <pre><acronym title="American Civil Liberties Union">ACLU</acronym></pre> <h2 id="label-Adding+Tables">Adding Tables<span><a href="#label-Adding+Tables">¶</a> <a href="#top">↑</a></span></h2> <p>In Textile, simple tables can be added by separating each column by a pipe.</p> <pre>|a|simple|table|row| |And|Another|table|row|</pre> <p>Styles are applied with curly braces.</p> <pre>table{border:1px solid black}. {background:#ddd;color:red}. |a|red|row|</pre> </main> <footer id="validator-badges" role="contentinfo"> <p><a href="https://validator.w3.org/check/referer">Validate</a> <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.1. <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>. </footer> Save