1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

Workaround to fix lineno

This commit is contained in:
Takashi Kokubun 2015-10-24 22:23:25 +09:00
parent b5939a3568
commit 3d7470989c

View file

@ -29,17 +29,15 @@ module RenderAssertion
options = options.dup
options.delete(:compatible_only)
options.delete(:error_with)
options = { escape_html: true, ugly: true}.merge(options)
options = { escape_html: true, ugly: true }.merge(options)
haml, html = haml.unindent, html.unindent
assert_equal html, render(haml, options)
end
def render(text, options = {}, base = nil, &block)
def render(text, options = {}, &block)
scope = options.delete(:scope) || Object.new
locals = options.delete(:locals) || {}
engine = Hamlit::HamlEngine.new(text, options)
return engine.to_html(base) if base
engine.to_html(scope, locals, &block)
eval Hamlit::HamlEngine.new(text, options).precompiled
end
end