Module: Haml::Filters::Markdown
- Includes:
- Base
- Defined in:
- lib/haml/filters.rb
Overview
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.
Instance Method Summary collapse
Methods included from Base
#compile, included, #internal_compile, #lazy_require, #render_with_options
Instance Method Details
#render(text) ⇒ Object
314 315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'lib/haml/filters.rb', line 314 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 |