Malt  Malt::Engine::Kramdown

[Validate]
Generated with RDazzle Newfish 1.4.0

Kramdown

Discount Markdown implementation.

  http://github.com/rtomayko/rdiscount

The :smart and :filter_html options can be set true to enable those flags on the underlying RDiscount object.

Public Instance Methods

intermediate(params) click to toggle source

Convert Markdown text to intermediate object.

    # File lib/malt/engines/kramdown.rb, line 33
33:     def intermediate(params)
34:       text = params[:text]
35:       ::Kramdown::Document.new(text)
36:     end
render(params) click to toggle source

Convert Markdown text to HTML text.

@option params [String] :text Template text @option params [String,Symbol] :to (‘html’) Type or file extension to convert template into.

    # File lib/malt/engines/kramdown.rb, line 19
19:     def render(params)
20:       text = params[:text]
21:       into = params[:to]
22:       case into
23:       when :html, nil
24:         intermediate(params).to_html
25:       when :latex
26:         intermediate(params).to_latex
27:       else
28:         super(params)
29:       end
30:     end

Private Instance Methods

initialize_engine() click to toggle source

Load rdoc makup library if not already loaded.

    # File lib/malt/engines/kramdown.rb, line 41
41:       def initialize_engine
42:         return if defined? ::Kramdown
43:         require_library 'kramdown'
44:       end

Disabled; run with --debug to generate this.