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

Fix error line reporting (again).

This commit is contained in:
Nathan Weizenbaum 2008-04-17 17:34:24 -07:00
parent e7321429e7
commit 9ea4533763

View file

@ -159,7 +159,7 @@ END
if old_line.spaces != old_line.tabs * 2 if old_line.spaces != old_line.tabs * 2
raise SyntaxError.new("Illegal Indentation: Only two space characters are allowed as tabulation.", raise SyntaxError.new("Illegal Indentation: Only two space characters are allowed as tabulation.",
old_line.index) 1 + old_line.index - @index)
end end
unless old_line.text.empty? || @haml_comment unless old_line.text.empty? || @haml_comment
@ -168,7 +168,7 @@ END
if !flat? && line.tabs - old_line.tabs > 1 if !flat? && line.tabs - old_line.tabs > 1
raise SyntaxError.new("Illegal Indentation: Indenting more than once per line is illegal.", raise SyntaxError.new("Illegal Indentation: Indenting more than once per line is illegal.",
old_line.index) 1 + old_line.index - @index)
end end
old_line = line old_line = line
newline newline