Skip to content
Discount (For Ruby) Implementation of John Gruber's Markdown
Branch: master
Clone or download
Latest commit 676a381 May 7, 2016


Discount Markdown Processor for Ruby

Build Status Build status

Discount is an implementation of John Gruber's Markdown markup language in C. It implements all of the language described in the markdown syntax document and passes the Markdown 1.0 test suite.

CODE: git clone git://

Discount was developed by David Loren Parsons. The Ruby extension is maintained by David Foster.


New releases of RDiscount are published to RubyGems:

$ [sudo] gem install rdiscount

The RDiscount sources are available via Git:

$ git clone git://
$ cd rdiscount
$ rake --tasks

See the file BUILDING for hacking instructions.


RDiscount implements the basic protocol popularized by RedCloth and adopted by BlueCloth:

require 'rdiscount'
markdown ="Hello World!")
puts markdown.to_html

Additional processing options can be turned on when creating the RDiscount object:

markdown ="Hello World!", :smart, :filter_html)

Inject RDiscount into your BlueCloth-using code by replacing your bluecloth require statements with the following:

  require 'rdiscount'
  BlueCloth = RDiscount
rescue LoadError
  require 'bluecloth'


Discount is free software; it is released under a BSD-style license that allows you to do as you wish with it as long as you don't attempt to claim it as your own work. RDiscount adopts Discount's license verbatim. See the file COPYING for more information.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.