public
Description: RedCloth is a Ruby library for converting Textile into HTML.
Homepage: http://code.whytheluckystiff.net/redcloth/
Clone URL: git://github.com/jgarber/redcloth.git
Click here to lend your support to: redcloth and make a donation at www.pledgie.com !
name age message
file CHANGELOG Fri Jun 20 15:11:26 -0700 2003 This commit was manufactured by cvs2svn to crea... [why]
file COPYING Fri Jun 20 14:50:11 -0700 2003 Initial revision [why]
file README Fri Jun 20 15:11:26 -0700 2003 This commit was manufactured by cvs2svn to crea... [why]
file install.rb Fri Jun 20 14:50:11 -0700 2003 Initial revision [why]
directory lib/ Fri Jun 20 15:11:26 -0700 2003 This commit was manufactured by cvs2svn to crea... [why]
file run-tests.rb Fri Jun 20 15:11:26 -0700 2003 This commit was manufactured by cvs2svn to crea... [why]
directory tests/ Fri Jun 20 14:50:11 -0700 2003 Initial revision [why]
README
h1. RedCloth


h2. Humane text for Ruby

RedCloth is a module for using Textile in Ruby.  Textile is a text format.  A very simple text format.  Another stab at 
making readable text that can be converted to HTML.

Textile is (c) 2003 Dean Allen.  All rights reserved. You can read more "here":http://www.textism.com/tools/textile/.

RedCloth is also based on PyTextile, which is: Copyright (c) 2003, "Mark Pilgrim":http://diveintomark.org/.  All rights 
reserved.  You can read more about PyTextile "here":http://diveintomark.org/projects/pytextile/.


h2. Installing RedCloth

To install RedCloth via raa-install:

<pre>
  raa-install -i redcloth
</pre>

Or download RedCloth and simply run the install.rb like so:

<pre>
  ruby install.rb config
  ruby install.rb setup
  sudo ruby install.rb install
</pre>


h2. Using RedCloth

The RedCloth class is an extension of Ruby's String class. Use it like you would a String:

<pre>
  >> r = RedCloth.new "*strong text* and _emphasized text_"
  => "*strong text* and _emphasized text_"
  >> r.gsub!( 'text', 'words' )
  => "*strong words* and _emphasized words_"
</pre>

To generate HTML from your RedCloth object, use the @RedCloth#to_html@ method:

<pre>
  >> r.to_html
  => "<p><strong>strong words</strong> and <em>emphasized words</em></p>"
</pre>


h2. The Textile language

See the "Textile home page":http://www.textism.com/tools/textile/ for details on the Textile language.