Class: Tilt::KramdownTemplate
Overview
Kramdown Markdown implementation. See: kramdown.rubyforge.org/
Constant Summary collapse
- DUMB_QUOTES =
[39, 39, 34, 34]
Instance Attribute Summary
Attributes inherited from Template
#compiled_path, #data, #file, #line, #options
Instance Method Summary collapse
Methods inherited from Template
#basename, default_mime_type, default_mime_type=, #eval_file, #initialize, metadata, #metadata, #name, #render
Constructor Details
This class inherits a constructor from Tilt::Template
Instance Method Details
#allows_script? ⇒ Boolean
20 21 22 |
# File 'lib/tilt/kramdown.rb', line 20 def allows_script? false end |
#evaluate(scope, locals, &block) ⇒ Object
16 17 18 |
# File 'lib/tilt/kramdown.rb', line 16 def evaluate(scope, locals, &block) @output ||= @engine.to_html end |
#prepare ⇒ Object
10 11 12 13 14 |
# File 'lib/tilt/kramdown.rb', line 10 def prepare [:smart_quotes] = DUMB_QUOTES unless [:smartypants] @engine = Kramdown::Document.new(data, ) @output = nil end |