Skip to content
nricciar edited this page Jan 18, 2011 · 8 revisions

WikiCloth is a Ruby implementation of the MediaWiki markup language.

Supports

  • Variables, Templates {{ ... }}
  • Links
    • External Links [ ... ]
    • Internal Links, Images [[ ... ]]
  • Wikimedia Markup
    • == Headings ==
    • Lists (*#;:)
    • bold ('''), italic ('') or both (''''')
    • Horizontal rule (----)
    • Tables
    • Table of Contents
  • <code>,<nowiki>,<pre> (disable wiki markup)
    • space at the beginning of a line (<pre>)
  • <ref> and <references/> support
  • html sanitization

Install

  git clone git://github.com/nricciar/wikicloth.git
  cd wikicloth/
  rake install

Usage

  @wiki = WikiCloth::Parser.new({
    :data => "{{test}} ''Hello {{test}}!''",
    :params => { "test" => "World" } })
  @wiki.to_html => "<p>&#123;&#123;test&#125;&#125;  <i>Hello World!</i></p>"

Additional support for templates, and custom behavior can be added by extending the WikiCloth::Parser class.

Clone this wiki locally