Skip to content

jakobjanot/multimarkdown-ffi

Repository files navigation

Ruby Multimarkdown 5

Build Status

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".

Synopsis

>> 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.

Installation

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'

Development

$ git clone git://github.com/jakobjanot/multimarkdown-ffi.git
$ cd multimarkdown-ffi
$ bundle install
$ bundle exec rake

Changes

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.

COPYING

MultiMarkdown-5, multimarkdown-ffi are both licensed under the MIT License. See LICENSE for more information.

About

A Multimarkdown wrapper for Ruby

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages