class Malt::Format::Markdown

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

Public Instance Methods

html(*data, &context) click to toggle source
# File lib/malt/formats/markdown.rb, line 32
def html(*data, &context)
  #engine.render(:text=>text, :file=>file, :format=>:html)
  render_into(:html, *data, &context)
end
latex(*data, &content) click to toggle source
# File lib/malt/formats/markdown.rb, line 44
def latex(*data, &content)
  render_into(:latex, *data, &content)
  #render_engine.render(:text=>text, :file=>file, :format=>:latex)
end
markdown(*) click to toggle source
# File lib/malt/formats/markdown.rb, line 18
def markdown(*)
  text
end
Also aliased as: md
md(*)
Alias for: markdown
to_html(*) click to toggle source

Convert to HTML.

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

Latex is only supported by the Kramdown engine.

# File lib/malt/formats/markdown.rb, line 50
def to_latex(*)
  opts = options.merge(:text=>html, :file=>refile(:latex), :type=>:latex)
  Latex.new(opts)
end
to_markdown(*) click to toggle source
# File lib/malt/formats/markdown.rb, line 25
def to_markdown(*)
  self
end
Also aliased as: to_md
to_md(*)
Alias for: to_markdown