Skip to content

Instantly share code, notes, and snippets.

@ELLIOTTCABLE
Created September 16, 2008 21:36
Show Gist options
  • Save ELLIOTTCABLE/11139 to your computer and use it in GitHub Desktop.
Save ELLIOTTCABLE/11139 to your computer and use it in GitHub Desktop.
%w[rubygems RedCloth].each {|dep| require dep }
module RedCloth
module Formatters::None
include RedCloth::Formatters::Base
end
class TextileDoc
def clean(*rules)
apply_rules(rules)
to(RedCloth::Formatters::None)
end
end
end
textile = RedCloth.new("A *TESTING* string!")
puts textile.clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment