Class: Snippets::Parsers::Textile

Inherits:
Object
  • Object
show all
Defined in:
lib/snippets/parsers/textile.rb

Class Method Summary collapse

Class Method Details

.parse(text) ⇒ Object



9
10
11
12
13
# File 'lib/snippets/parsers/textile.rb', line 9

def self.parse(text)
  textilized = RedCloth.new(text, [ :hard_breaks ])
  textilized.hard_breaks = true if textilized.respond_to?("hard_breaks=")
  textilized.to_html
end