Class | Tilt::RDiscountTemplate |
In: |
lib/sinatra/tilt.rb
|
Parent: | Template |
Discount Markdown implementation. See: github.com/rtomayko/rdiscount
RDiscount is a simple text filter. It does not support scope or locals. The +:smart+ and +:filter_html+ options may be set true to enable those flags on the underlying RDiscount object.
# File lib/sinatra/tilt.rb, line 408 408: def compile! 409: @engine = RDiscount.new(data, *flags) 410: end
# File lib/sinatra/tilt.rb, line 412 412: def evaluate(scope, locals, &block) 413: @engine.to_html 414: end
# File lib/sinatra/tilt.rb, line 400 400: def flags 401: [:smart, :filter_html].select { |flag| options[flag] } 402: end