Ruby MultiMarkdown 4
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 'multimarkdown'
>> 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 multimarkdown
Bundle via Bundler:
gem 'multimarkdown'
Hacking:
$ git clone --recursive git://github.com/tillsc/multi_markdown.git
$ cd multi_markdown
$ bundle install
$ bundle exec rake test
Changes
- Version 4.5.0.1: First Version based upon rpeg-markdown and rpeg-multimarkdown.
COPYING
MultiMarkdown-4, multi_markdown are both licensed under the GPL and the MIT License. See LICENSE for more information.