Reputation: 239177
I'm looking for a Markdown library, written purely in Ruby (not C, or anything else). I need to use it as an example because I am having to write my own. Do you know of a pure Ruby implementation of a Markdown processor?
Upvotes: 5
Views: 595
Reputation: 303530
Searching the gems repository for Markdown yields a variety of hits:
kramdown — Yet-another-markdown-parser but fast, pure Ruby, using a strict syntax definition and supporting several common extensions. It is probably the fastest pure-Ruby Markdown converter available (January 2011), being about 4x faster than Maruku and about 5x faster than BlueFeather.
Maruku — A pure-Ruby Markdown-superset interpreter.
BlueFeather - Software for converting text written by extended Markdown like PHP Markdown Extra to html. It is pair of command-line tool and pure Ruby library.
I'm personally using kramdown for my blog on phrogz.net, and it's been working like a charm. I particularly like some of its extensions, such as the ability to apply custom attributes (e.g. CSS classes) to elements and custom id
attributes to headers.
Upvotes: 6