Skip to content

tillsc/multi_markdown

Repository files navigation

Ruby MultiMarkdown 6

Build Status

An extension library around Fletcher Penney's MultiMarkdown library in C. It is based upon the ruby rpeg-markdown and rpeg-multimarkdown libraries by Ryan Tomayko and Oliver "djungelvral".

Synopsis

>> require 'rmultimarkdown'

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

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

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

>> doc = MultiMarkdown.new("Title: Some document  \n\nSome text in the document")

>> doc.metadata
#=> {"title" => "Some document"}

>> doc.metadata("Title")
#=> "Some document"

See MultiMarkdown documentation and MultiMarkdown's RDoc for further Details.

Installation / Hacking

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

Install from Rubygems:

$ [sudo] gem install rmultimarkdown

Bundle via Bundler:

gem 'rmultimarkdown'

Hacking:

$ git clone --recursive git://github.com/tillsc/multi_markdown.git
$ cd multi_markdown
$ bundle install
$ bundle exec rake MultiMarkdown-6:init
$ bundle exec rake test

Versioning

Beware: The versioning scheme isn't based upon Semantic Versioning! The first three version numbers are inherited from the underlying C library. Only the last number is used to indicate changes in the Ruby wrapper itself.

COPYING

MultiMarkdown-6, multi_markdown are both licensed under the GPL and the MIT License. See LICENSE for more information.