[ANN] RedCloth 2.0.5 -- A Textile Humane Web Text Generator

from a smoking kite on its way down:

RedCloth 2.0.5. Available in RAA.
http://rubyforge.org/frs/download.php/514/redcloth-2.0.5.tar.gz

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.

This release contains numerous new features which make RedCloth better
suited to wikis (such as the gorgeous Instiki product). This version
introduces a safe mode, which can filter out html and/or css from
incoming Textile documents. You can turn on this feature either by
passing in the restrictions to RedCloth:

textile = “h2{color: red}. Test document” +
"\n"
restrictions = [:filter_html, :filter_styles]

RedCloth.new(textile, restrictions).to_html

=> “

Test <b>document</b>
\n<b>

Alternatively, you can set the restrictions through accessors to your
RedCloth instance.

textile = “h2{color: red}. Test document” +
"\n"

r = RedCloth.new(textile)
r.filter_html = true
r.filter_styles = true

=> “

Test <b>document</b>
\n<b>

Thanks to Florian Gross for this marvelous patch!

This version also features line folding, as suggested by Jim Menard.
Line folding allows RedCloth to treat lines with a single newline
between them as a complete sentence. Blank lines are then treated as
paragraph breaks.

An example:

r = RedCloth.new( <<RED )
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.

This release contains numerous new features which
make RedCloth better suited to Wikis (such as the
gorgeous Instiki product).
RED

r.fold_lines = true
r.to_html

=> "

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 <span class=\"caps\">HTML</span>.
   </p>\n\n\t<p>This release contains numerous
   new features which make RedCloth better
   suited to Wikis (such as the gorgeous
   Instiki product). </p>"

Jim sent in a number of bugfixes as well:

  • Problem with em-dashes at the start of blocks.
  • Footnotes were broken.

Many starches, Jim! And everyone who has bugged me about docs:
thankyou. I’m on it.

_why