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

Use _erbout rather than _hamlout.buffer for :ugly to avoid method-call costs.

This commit is contained in:
Nathan Weizenbaum 2008-12-28 14:46:31 -08:00
parent 9334f0797d
commit eb1e034734

View file

@ -285,7 +285,7 @@ END
@precompiled <<
if @options[:ugly]
"_hamlout.buffer << #{unescape_interpolation(text)};"
"_erbout << #{unescape_interpolation(text)};"
else
"_hamlout.push_text(#{unescape_interpolation(text)}, #{tab_change}, #{@dont_tab_up_next_text.inspect});"
end
@ -338,7 +338,7 @@ END
push_silent "haml_temp = #{text}"
newline_now
push_and_tabulate([:loud, "_hamlout.buffer << #{no_format ? 'haml_temp' : out}"])
push_and_tabulate([:loud, "_erbout << #{no_format ? 'haml_temp' : out}"])
end
# Causes <tt>text</tt> to be evaluated, and Haml::Helpers#find_and_flatten