Class: Transmuter::Format::Markdown
- Inherits:
-
Object
- Object
- Transmuter::Format::Markdown
- Defined in:
- lib/transmuter/format/markdown.rb
Constant Summary collapse
- REDCARPET_OPTIONS =
[:autolink, :no_intraemphasis, :fenced_code, :gh_blockcode]
Instance Method Summary collapse
-
#initialize(markdown, options = {}) ⇒ Markdown
constructor
A new instance of Markdown.
- #to_html ⇒ Object
- #to_pdf ⇒ Object
Constructor Details
#initialize(markdown, options = {}) ⇒ Markdown
Returns a new instance of Markdown.
8 9 10 11 |
# File 'lib/transmuter/format/markdown.rb', line 8 def initialize(markdown, = {}) () @markdown = markdown end |
Instance Method Details
#to_html ⇒ Object
19 20 21 22 |
# File 'lib/transmuter/format/markdown.rb', line 19 def to_html html = Html.new(parse_markdown, ) html.process end |
#to_pdf ⇒ Object
13 14 15 16 17 |
# File 'lib/transmuter/format/markdown.rb', line 13 def to_pdf html = to_html pdf = Pdf.new(html, ) pdf.process end |