rtomayko / rdiscount

Discount (For Ruby) Implementation of John Gruber's Markdown

This URL has Read+Write access

name age message
file .gitignore Sat Jan 31 13:41:21 -0800 2009 Merge js/master: TOC and Ruby 1.9 support [rtomayko]
file COPYING Thu May 29 19:51:11 -0700 2008 initial commit of discount ruby extension at 1.... [rtomayko]
file README.markdown Fri Nov 13 14:55:01 -0800 2009 Misc README/doc tweaks [rtomayko]
file Rakefile Fri Nov 13 14:02:04 -0800 2009 Add xml.c and css.c needed to compile windows ... [rtomayko]
directory bin/ Tue Jun 03 03:59:06 -0700 2008 Rename Discount as RDiscount The "Discount" na... [rtomayko]
directory ext/ Fri Nov 13 14:02:04 -0800 2009 Add xml.c and css.c needed to compile windows ... [rtomayko]
directory lib/ Fri Nov 13 14:55:01 -0800 2009 Misc README/doc tweaks [rtomayko]
file rdiscount.gemspec Sat Nov 14 16:02:44 -0800 2009 add David to authors list [rtomayko]
directory test/ Sat Nov 14 16:09:28 -0800 2009 fix up test names to pretty up turn output [rtomayko]
README.markdown

Discount Markdown Processor for Ruby

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://github.com/rtomayko/rdiscount.git
HOME: http://github.com/rtomayko/rdiscount
DOCS: http://rdoc.info/projects/rtomayko/rdiscount
BUGS: http://github.com/rtomayko/rdiscount/issues

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

INSTALL, HACKING

New releases of RDiscount are published to gemcutter:

$ [sudo] gem install rdiscount -s http://gemcutter.org

The RDiscount sources are available via Git:

$ git clone git://github.com/rtomayko/rdiscount.git
$ cd rdiscount
$ rake --tasks

USAGE

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

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

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

markdown = RDiscount.new("Hello World!", :smart, :filter_html)

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

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

COPYING

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.