An FFI extension library around the Fletcher Penney's MultiMarkdown C-library. It is based upon the multimarkdown4 ruby wrapper rmultimarkdown by Till Schulte-Coerne, which was inspired by rpeg-markdown and rpeg-multimarkdown libraries by Ryan Tomayko and Oliver "djungelvral".
>> require 'multimarkdown-ffi'
>> 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.
The library has been tested with later versions of Ruby MRI and JRuby
Install from Rubygems:
$ [sudo] gem install multimarkdown-ffi
Or add to your projects Gemfile Bundler:
gem 'multimarkdown-ffi'
$ git clone git://github.com/jakobjanot/multimarkdown-ffi.git
$ cd multimarkdown-ffi
$ bundle install
$ bundle exec rake
Beware: The versioning scheme isn't based upon Semantic Versioning, but inherits from the underlying C library. Only the last number is used to indicate changes in the Ruby wrapper itself.
MultiMarkdown-5, multimarkdown-ffi are both licensed under the MIT License. See LICENSE for more information.