Hard tabs in empty lines in Haml and Sass no longer throw errors.
git-svn-id: svn://hamptoncatlin.com/haml/trunk@459 7063305b-7217-0410-af8c-cdc13e5119b9
This commit is contained in:
parent
ff17efc1fc
commit
bf5049cfca
|
@ -716,6 +716,8 @@ END
|
|||
def count_soft_tabs(line)
|
||||
spaces = line.index(/[^ ]/)
|
||||
if line[spaces] == ?\t
|
||||
return nil if line.strip.empty?
|
||||
|
||||
raise SyntaxError.new("Illegal Indentation: Only two space characters are allowed as tabulation.")
|
||||
end
|
||||
[spaces, spaces/2]
|
||||
|
|
|
@ -142,6 +142,9 @@ module Sass
|
|||
spaces = line.index(/[^ ]/)
|
||||
if spaces
|
||||
if spaces % 2 == 1 || line[spaces] == ?\t
|
||||
# Make sure a line with just tabs isn't an error
|
||||
return nil if line.strip.empty?
|
||||
|
||||
raise SyntaxError.new("Illegal Indentation: Only two space characters are allowed as tabulation.", @line)
|
||||
end
|
||||
spaces / 2
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
Woah a period.
|
||||
= "test" |
|
||||
"test" |
|
||||
-# Hard tabs shouldn't throw errors.
|
||||
|
||||
- case :foo
|
||||
- when :bar
|
||||
%br Blah
|
||||
|
|
|
@ -109,6 +109,9 @@ body
|
|||
a:hover
|
||||
:text-decoration underline
|
||||
|
||||
// A hard tab:
|
||||
|
||||
|
||||
#content
|
||||
p, div
|
||||
:width 40em
|
||||
|
|
Loading…
Reference in New Issue