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

Fixing a bug caused by the last checkin. Thanks to Xin from the Haml list for pointing this out.

git-svn-id: svn://hamptoncatlin.com/haml/trunk@707 7063305b-7217-0410-af8c-cdc13e5119b9
This commit is contained in:
nex3 2008-01-02 18:57:39 +00:00
parent e247a9bde6
commit 3e92427647

View file

@ -643,7 +643,7 @@ END
# Counts the tabulation of a line. # Counts the tabulation of a line.
def count_soft_tabs(line) def count_soft_tabs(line)
spaces = line.index(/[^ ]/) spaces = line.index(/([^ ]|$)/)
if line[spaces] == ?\t if line[spaces] == ?\t
return nil if line.strip.empty? return nil if line.strip.empty?
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.")