Method: Haml::Filters::Markdown#render

Defined in:
lib/haml/filters.rb

#render(text) ⇒ Object



250
251
252
253
254
255
256
257
258
259
260
261
262
# File 'lib/haml/filters.rb', line 250

def render(text)
  engine = case @required
           when 'rdiscount'
             ::RDiscount
           when 'peg_markdown'
             ::PEGMarkdown
           when 'maruku'
             ::Maruku
           when 'bluecloth'
             ::BlueCloth
           end
  engine.new(text).to_html
end