Malt  Malt::Format::Markdown

[Validate]
Generated with RDazzle Newfish 1.4.0

Markdown

If using the Kramdown engine, then Latex is also a supported output format.

Public Instance Methods

html(*) click to toggle source
    # File lib/malt/formats/markdown.rb, line 15
15:     def html(*)
16:       render_engine.render(:text=>text, :file=>file, :format=>:html)
17:     end
latex(*) click to toggle source
    # File lib/malt/formats/markdown.rb, line 20
20:     def latex(*)
21:       render_engine.render(:text=>text, :file=>file, :format=>:latex)
22:     end
markdown(*) click to toggle source
    # File lib/malt/formats/markdown.rb, line 25
25:     def markdown(*)
26:       text
27:     end
Also aliased as: md
md(*) click to toggle source
to_html(*) click to toggle source

Convert to HTML.

    # File lib/malt/formats/markdown.rb, line 33
33:     def to_html(*)
34:       opts = options.merge(:text=>html, :file=>refile(:html), :type=>:html)
35:       HTML.new(opts)
36:     end
to_latex(*) click to toggle source

Latex is only supported by the Kramdown engine.

    # File lib/malt/formats/markdown.rb, line 39
39:     def to_latex(*)
40:       opts = options.merge(:text=>html, :file=>refile(:latex), :type=>:latex)
41:       Latex.new(opts)
42:     end
to_markdown(*) click to toggle source
    # File lib/malt/formats/markdown.rb, line 45
45:     def to_markdown(*)
46:       self
47:     end
Also aliased as: to_md
to_md(*) click to toggle source

Private Instance Methods

render_engine() click to toggle source
    # File lib/malt/formats/markdown.rb, line 67
67:       def render_engine
68:         @render_engine ||= (
69:           case engine
70:           when :bluecloth
71:             Malt::Engine::BlueCloth.new(options)
72:           when :kramdown
73:             Malt::Engine::Kramdown.new(options)
74:           else
75:             Malt::Engine::RDiscount.new(options)
76:           end
77:         )
78:       end

Disabled; run with --debug to generate this.