Ruby PEG Markdown

An extension library around John MacFarlane's fast implementation of Markdown in C.


>> require 'markdown'
>> puts'Hello, world.').to_html
<p>Hello, world.</p>

>> puts'_Hello World!_', :smart, :filter_html).to_html
<p><em>Hello World!</em></p>

>> puts'_Hello World!_').to_latex
\emph{Hello World!}

>> puts'_Hello World!_').to_groff_mm
\fIHello world!\fR

>>'Hello! World!')

Installation / Hacking

This library requires a recent version of glib2. All modern GNU userland systems should be fine.

Install from GEM:

$ sudo gem install rpeg-markdown


$ git clone git://
$ cd rpeg-markdown
$ rake test

Patches happily accepted via fork or email.



The peg-markdown sources are licensed under the GPL and the Ruby PEG Markdown extension sources adopts this license. See the file LICENSE included with this distribution for more information.