Class: Malt::Engine::BlueCloth

Inherits:
Abstract
  • Object
show all
Defined in:
lib/malt/engines/bluecloth.rb

Instance Attribute Summary

Attributes inherited from Abstract

#settings

Instance Method Summary collapse

Methods inherited from Abstract

#cache?, #compile, default, #initialize, register

Constructor Details

This class inherits a constructor from Malt::Engine::Abstract

Instance Method Details

#intermediate(params) ⇒ Object

Convert Markdown text to intermediate object.



23
24
25
26
# File 'lib/malt/engines/bluecloth.rb', line 23

def intermediate(params)
  text = params[:text]
  ::BlueCloth.new(text)
end

#render(params) ⇒ Object

Convert Markdown text to HTML text.



11
12
13
14
15
16
17
18
19
20
# File 'lib/malt/engines/bluecloth.rb', line 11

def render(params)
  text = params[:text]
  into = params[:to]
  case into
  when :html, nil
    intermediate(params).to_html
  else
    super(params)
  end
end