Class: Mdoc::Document::Kramdown

Inherits:
Mdoc::Document show all
Defined in:
lib/mdoc/document/kramdown.rb

Constant Summary

Constants inherited from Mdoc::Document

LOOP_MAX

Instance Attribute Summary

Attributes inherited from Mdoc::Document

#body, #file, #meta, #out_file, #performed, #smeta, #tpl_file

Instance Method Summary collapse

Methods inherited from Mdoc::Document

#apply!, #initialize

Constructor Details

This class inherits a constructor from Mdoc::Document

Instance Method Details

#body_htmlObject Also known as: to_html



12
13
14
# File 'lib/mdoc/document/kramdown.rb', line 12

def body_html
  kramdown.to_html
end

#body_latexObject Also known as: body_tex, to_latex



16
17
18
# File 'lib/mdoc/document/kramdown.rb', line 16

def body_latex
  kramdown.to_latex
end

#kramdownObject



6
7
8
9
10
# File 'lib/mdoc/document/kramdown.rb', line 6

def kramdown
  # TODO: toc and other preprocessors
  @kramdown = ::Kramdown::Document.new(@body) unless @kramdown
  @kramdown
end