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

Cleaning up Precompiler#process_indent

git-svn-id: svn://hamptoncatlin.com/haml/trunk@674 7063305b-7217-0410-af8c-cdc13e5119b9
This commit is contained in:
nex3 2007-11-25 20:23:30 +00:00
parent 55ce4ab5a9
commit 1d274fbfef

View file

@ -172,13 +172,9 @@ END
# Processes and deals with lowering indentation. # Processes and deals with lowering indentation.
def process_indent(line) def process_indent(line)
return unless line.tabs <= @template_tabs && @template_tabs > 0 return unless line.tabs <= @template_tabs && @template_tabs > 0
to_close = @template_tabs - line.tabs
to_close.times do |i| to_close = @template_tabs - line.tabs
unless to_close - 1 - i == 0 && mid_block_keyword?(line.text) to_close.times { |i| close unless to_close - 1 - i == 0 && mid_block_keyword?(line.text) }
close
end
end
end end
# Processes a single line of Haml. # Processes a single line of Haml.