Skip to content

Commit

Permalink
change unless to if statement to avoid unless/else
Browse files Browse the repository at this point in the history
  • Loading branch information
teeparham committed Dec 9, 2013
1 parent 40d3e7a commit 16d92a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/haml/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 16d92a1

Please sign in to comment.