Rewrite of RedCloth in Parslet
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
script
spec
.autotest
.gitignore
.rspec
.ruby-version
.travis.yml
CHANGELOG.textile
Gemfile
Gemfile.lock
LICENSE
README.textile
Rakefile
redcloth-parslet.gemspec

README.textile

RedCloth + Parslet

Yet another attempt to rewrite RedCloth, which is a Textile parser for Ruby. When finished, it will become RedCloth 5.0.

Installation

Changes from RedCloth 4

Gem name no longer case-sensitive

Historically, the RedCloth gem was case-sensitive. gem install redcloth or including gem 'redcloth' in your Gemfile would result in an error. Now, either case works.

hard_breaks option removed

Textile has always defined line breaks to indicate an HTML BR tag, such as in an address or a poem. RedCloth 3 (c. 2004) integrated Markdown formatting, which ignores line breaks, and then RedCloth 4 (c. 2008) removed Markdown and deprecated the hard_breaks option. RedCloth 5 has removed the option entirely.

Ignoring line breaks is not part of the Textile spec. If your document has extraneous line breaks, it must not be Textile. RedCloth 3 and 4 can still parse markup that was intended for them. If you need features or bug fixes from RedCloth 5, consider “upgrading” your input text.

LaTeX formatting extracted

A LaTeX formatter used to be included with RedCloth. It is not anymore, but creating a redcloth-latex gem that defines the formatter class wouldn’t be difficult. If you do so, I’ll feature your gem here.

Usage

Options and customization

Contributing

Credits

Author

Jason Garber is a Ruby developer in Philadelphia. He has been developing in Ruby since 2005 and has been the official maintainer of RedCloth since 2008.

Acknowledgements

The author would like to thank all the contributors to RedCloth over the years, but in particular:

  • Why the Lucky Stiff (original author, 2003)
  • Bil Kleb (LaTeX formatter, 2009)
  • Ola Bini (JRuby compatibility, 2008)
  • Lucas Carlson (2006)

License

See LICENSE.

Textile

What is Textile?

Reasons to prefer it to Markdown

Reference and resources