Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 1.6 KB

README.markdown

File metadata and controls

59 lines (40 loc) · 1.6 KB

Ruby PEG MultiMarkdown

An extension library around Fletcher Penney's implementation of MultiMarkdown in C. This library is based (almost entirely) on rpeg-markdown, which is a ruby extension library around John MacFarlane's C implementation of Markdown.

Synopsis

>> require 'multimarkdown'

>> puts MultiMarkdown.new('Hello, world.').to_html
# <p>Hello, world.</p>

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

>> puts MultiMarkdown.new('_Hello World!_').to_latex
# \emph{Hello World!}

>> puts MultiMarkdown.new("Title: Some document\n\nSome text in the document").extract_metadata("title")
# Some document

>> PEGMultiMarkdown.new('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-multimarkdown

Hacking:

$ git clone git://github.com/djungelvral/rpeg-multimarkdown.git
$ cd rpeg-multimarkdown
$ rake test

Changes

COPYING

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