Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 0ed3b61a11
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (22 sloc) 0.548 kb
require 'maruku'
require 'sinatra/base'
module Sinatra
module Maruku
def maruku(template, options={}, locals={})
render :maruku, template, options, locals
end
private
def render_maruku(data, options, locals, &block)
maruku_src = render_erb(data, options, locals, &block)
instance = ::Maruku.new(maruku_src, options)
if block_given?
# render layout
instance.to_html_document
else
# render template
instance.to_html
end
end
end
helpers Maruku
end
Jump to Line
Something went wrong with that request. Please try again.