Class: Cadmus::Renderers::Markdown
Overview
A Cadmus renderer that handles Markdown input using the Redcarpet rendering engine. It can produce +:html+ and +:text+ formats, using Cadmus::Markdown::HtmlRenderer and Cadmus::Markdown::TextRenderer.
Liquid is rendered first, then the result is processed as Markdown.
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#markdown_options ⇒ Object
Additional options to be passed as the second argument to the Redcarpet::Markdown constructor.
Attributes inherited from Base
#default_assigns, #default_filters, #default_registers, #html_sanitizer
Instance Method Summary collapse
-
#initialize ⇒ Markdown
constructor
A new instance of Markdown.
- #preprocess(template, format, options = {}) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize ⇒ Markdown
Returns a new instance of Markdown.
77 78 79 80 |
# File 'lib/cadmus/markdown.rb', line 77 def initialize super @markdown_options = {} end |
Instance Attribute Details
#markdown_options ⇒ Object
Additional options to be passed as the second argument to the Redcarpet::Markdown constructor.
75 76 77 |
# File 'lib/cadmus/markdown.rb', line 75 def @markdown_options end |
Instance Method Details
#preprocess(template, format, options = {}) ⇒ Object
87 88 89 |
# File 'lib/cadmus/markdown.rb', line 87 def preprocess(template, format, ={}) redcarpet_instance.render(super) end |