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

Get rid of a bit of unnecessary 'optimization.'

This commit is contained in:
Nathan Weizenbaum 2008-05-10 13:38:47 -07:00
parent 204ba03175
commit d085523f19

View file

@ -110,12 +110,7 @@ module Haml
result = Haml::Helpers.find_and_preserve(result)
end
result = result.to_s
while result[-1] == ?\n
# String#chomp is slow
result = result[0...-1]
end
result = result.to_s.rstrip
result = html_escape(result) if escape_html
has_newline = result.include?("\n")