diff --git a/lib/haml/helpers.rb b/lib/haml/helpers.rb index d2b6753e42..6577731906 100644 --- a/lib/haml/helpers.rb +++ b/lib/haml/helpers.rb @@ -391,10 +391,10 @@ def capture_haml(*args, &block) # # @param text [#to_s] The text to output def haml_concat(text = "") - unless haml_buffer.options[:ugly] || haml_indent == 0 - haml_buffer.buffer << %[#{haml_indent}#{text.to_s.gsub("\n", "\n#{haml_indent}")}\n] - else + if haml_buffer.options[:ugly] || haml_indent == 0 haml_buffer.buffer << "#{text}\n" + else + haml_buffer.buffer << %[#{haml_indent}#{text.to_s.gsub("\n", "\n#{haml_indent}")}\n] end ErrorReturn.new("haml_concat") end