Markdown Processing in Ruby

Originally published at: http://www.sitepoint.com/markdown-processing-ruby/
Markdown-mark

Markdown is a fantastic markup language that compiles into HTML. Although its original implementation was written in Perl, Markdown has been ported into multiple languages with various features. We’re going to focus on 4 Ruby implementations of Markdown: kramdown, maruku, rdiscount, and redcarpet.

Processing Markdown in Ruby

Obviously, we should install these gems first, so gem install kramdown maruku rdiscount redcarpet. This may take a little bit of time because both RDiscount and Redcarpet use C extensions for faster processing speed.
This also means that, if your Ruby interpreter doesn’t support C extensions, you won’t be able to use RDiscount or Redcarpet. I’m looking at you, JRuby.

For our processing needs, we’ll use the Markdown from John Gruber’s Markdown syntax page saved to markup.md.

Continue reading this article on SitePoint

As the Maruku maintainer, I have to point out that it does support tables, but I agree that you should use something else. Kramdown is my favorite because it's pure-Ruby and well-built, but Redcarpet is very nice too.

Ah, that's my mistake @bhollis. I'll make sure that it gets corrected.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.