Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pandoc support #1533

Merged
merged 2 commits into from
Aug 17, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Rename default_outvar to exclude_outvar
  • Loading branch information
304 committed Jun 25, 2019
commit 6ebf9ceb27beaaaa85fb85f3aef3607d3221c2cd
6 changes: 3 additions & 3 deletions lib/sinatra/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ def liquid(template, options = {}, locals = {}, &block)
end

def markdown(template, options = {}, locals = {})
options[:default_outvar] = false
options[:exclude_outvar] = true
render :markdown, template, options, locals
end

Expand Down Expand Up @@ -819,11 +819,11 @@ def render(engine, data, options = {}, locals = {}, &block)
content_type = options.delete(:content_type) || content_type
layout_engine = options.delete(:layout_engine) || engine
scope = options.delete(:scope) || self
default_outvar = options.delete(:default_outvar) != false
exclude_outvar = options.delete(:exclude_outvar)
options.delete(:layout)

# set some defaults
options[:outvar] ||= '@_out_buf' if default_outvar
options[:outvar] ||= '@_out_buf' unless exclude_outvar
options[:default_encoding] ||= settings.default_encoding

# compile and render template
Expand Down