Wikitext 2.0 released

A major new version of the Wikitext gem, version 2.0, is now available. This release offers full support for Rails 3 (while retaining support for Rails 2) and conforms fully to the new HTML5 specification (while maintaining backwards compatibility with HTML4/XHTML).

New features in 2.0

Full support for Rails 3

  • compatibility with the Rails 3 template handler API
  • use of Rails 3 "hooks" to auto-initialize when listed in the Gemfile

HTML5 compliance

  • all output is now a valid HTML5 fragment (while retaining compliance with HTML4/XHTML)
  • while <tt> tags may still be used in the input, we no longer emit <tt> tags in the output (<tt> was removed from HTML5); we instead output <code> tags
  • explicit support for the two HTML5 output syntaxes, HTML (the new default) and XML (available via the new output_style setting)

About the extension

Wikitext is a fast wikitext-to-HTML translator with a syntax very close to that used by MediaWiki. It is a Ruby extension written with speed and robustness in mind using a Ragel-generated scanner and an extremely fast hand-coded parser, all in C. It has an enormous spec suite.

You can browse the source code repo, or download the gem from the rubygems.org downloads page. For an overview of how to use the extension check out the RDoc here. If you have RubyGems then you can install it with either gem install wikitext or sudo gem install wikitext.

If you find the extension useful please consider making a donation via PayPal.