| 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 330
330: def render(text)
331: engine = case @required
332: when 'rdiscount'
333: ::RDiscount
334: when 'peg_markdown'
335: ::PEGMarkdown
336: when 'maruku'
337: ::Maruku
338: when 'bluecloth'
339: ::BlueCloth
340: end
341: engine.new(text).to_html
342: end