Skip to content

Instantly share code, notes, and snippets.

@adelcambre
Created August 29, 2008 22:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adelcambre/8067 to your computer and use it in GitHub Desktop.
Save adelcambre/8067 to your computer and use it in GitHub Desktop.
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'redcloth'
=> true
irb(main):005:0> a = RedCloth.new "_italic_ <pre><code>var a = 'blah';</code></pre> *bold*"
=> "_italic_ <pre><code>var a = 'blah';</code></pre> *bold*"
irb(main):006:0> a.to_html
=> "<p><em>italic</em> <pre><code>var a = 'blah';</code></pre> <strong>bold</strong></p>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment