kramdown

  596 downloads
1.2.0 MIT/X Consortium License    
  not rated
Fast, pure-Ruby Markdown-superset converter

description

download

specifications

changelog

kramdown is a free Ruby library that can be used for parsing a superset of Markdown. It is completely written in Ruby, supports standard Markdown (with some minor modifications) and various extensions that have been made popular by the PHP Markdown Extra package and Maruku.

It is probably the fastest pure-Ruby Markdown converter available (November 2009), being 5x faster than Maruku and about 10x faster than BlueFeather.

The kramdown syntax is based on Markdown, a very easy to write, easy to read markup for writing HTML documents in plain text. Since the basic Markdown syntax has some shortcomings, implementations (especially the PHP Markdown Extra package) have tried to overcome this shortcomings with additional syntax. kramdown supports all features of the original Markdown syntax (albeit with some minor corrections) as well as newer features implemented in the PHP Markdown Extra package and Maruku.

Usage:

The kramdown package provides two ways for using it:

* As a library

 kramdown uses basically the same API as RedCloth, BlueCloth and Maruku:

 require 'kramdown'

 Kramdown::Document.new(text).to_html


 The second parameter to the new call is an options hash for (de)activating certain features. For more information have a look at the API documentation.

* As an application

 Together with the library files a binary called kramdown is shipped which can be used to convert text in kramdown syntax to HTML. It either reads from the files specified as the command line arguments or from the standard input. For example:

 kramdown path/to/kramdown/doc/syntax.page
READ MORE   
Last updated on September 17th, 2012

0 User reviews so far.

SUBMIT