Sha256: 79526a175d77fcfc34f794e4357d5d83671b5ac4ae7986aa12db899e250a44a3
Contents?: true
Size: 595 Bytes
Versions: 3
Compression:
Stored size: 595 Bytes
Contents
require "tilt" module Tilt register :html, Tilt::ERBTemplate register :php, Tilt::ERBTemplate # My Markdown implementation. class MarkdownTemplate < Template def prepare @erb_engine = Tilt::ERBTemplate.new { data } end def evaluate(scope, locals, &block) # First evaluate the code using ERB erb_output = @erb_engine.render(scope, locals, &block) # Then evaluate the code using the RDiscountTemplate Tilt::RDiscountTemplate.new { erb_output }.render end end register :markdown, MarkdownTemplate register :md, MarkdownTemplate end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
massimo-0.4.6 | lib/massimo/templates.rb |
massimo-0.4.5 | lib/massimo/templates.rb |
massimo-0.4.4 | lib/massimo/templates.rb |