Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pure Ruby (not C) Markdown library

Tags:

markdown

ruby

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?

like image 789
Andrew Avatar asked Jan 25 '12 21:01

Andrew


1 Answers

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.

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

like image 146
Phrogz Avatar answered Sep 30 '22 13:09

Phrogz