| Module | Haml::Filters::Markdown |
| In: |
lib/haml/filters.rb
|
Parses the filtered text with [Markdown](daringfireball.net/projects/markdown). Only works if [RDiscount](github.com/rtomayko/rdiscount), [RPeg-Markdown](github.com/rtomayko/rpeg-markdown), [Maruku](maruku.rubyforge.org), or [BlueCloth](www.deveiate.org/projects/BlueCloth) are installed.
@see Base#render
# File lib/haml/filters.rb, line 349
349: def render(text)
350: engine = case @required
351: when 'rdiscount'
352: ::RDiscount
353: when 'peg_markdown'
354: ::PEGMarkdown
355: when 'maruku'
356: ::Maruku
357: when 'bluecloth'
358: ::BlueCloth
359: end
360: engine.new(text).to_html
361: end