Last Update: Thu Jul 17 12:56:54 -0400 2008

RedCloth 4.0

  • New SuperRedCloth (RedCloth 4.0) is a total rewrite using Ragel for the parsing.
  • Markdown support has been removed.
  • Single newlines become <br> tags, just as in traditional RedCloth and other Textile parsers.
  • HTML special characters are automatically escaped inside code signatures, like Textile 2. This means you can simply write @<br />@ and the symbols are escaped whereas in RedCloth 3 you had to write @&lt;br /&gt;@ to make the code fragment readable.
  • The restrictions parameter is observed just like previous versions (except :hard_breaks is now the default).
  • Arguments to RedCloth#to_html are called so extensions made for prior versions can work. Note: extensions need to be included rather than defined directly within the RedCloth class as was previously possible.
  • Custom block tags can be implemented as in the previous version, though the means of implementing them differs.
  • HTML embedded in the Textile input does not often need to be escaped from Textile parsing.
  • The parser will not wrap lines that begin with a space in paragraph tags.
  • Rudimentary support for LaTeX is built in.
  • RedCloth::VERSION on a line by itself inserts the version number into the output.
  • Output (less newlines and tabs) is identical to Textile 2 except a few cases where the RedCloth way was preferable.
  • Over 500 tests prevent regression
  • It‘s 40 times faster than the previous version.