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 %Markdown Processing in Ruby%
by Jesse Herrick via SitePoint
No comments:
Post a Comment