Empty lines in Sass no longer cause erroneous line number reporting.
git-svn-id: svn://hamptoncatlin.com/haml/trunk@434 7063305b-7217-0410-af8c-cdc13e5119b9
This commit is contained in:
parent
cfedaaf8b0
commit
cb2bc5d3d6
|
@ -104,6 +104,8 @@ module Sass
|
|||
@lines << [line.strip, tabs]
|
||||
|
||||
old_tabs = tabs
|
||||
else
|
||||
@lines << ['//', old_tabs]
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -61,11 +61,11 @@ class SassEngineTest < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_exception_line
|
||||
to_render = "rule\n :attr val\n :broken\n"
|
||||
to_render = "rule\n :attr val\n// comment!\n\n :broken\n"
|
||||
begin
|
||||
Sass::Engine.new(to_render).render
|
||||
rescue Sass::SyntaxError => err
|
||||
assert_equal(3, err.sass_line)
|
||||
assert_equal(5, err.sass_line)
|
||||
else
|
||||
assert(false, "Exception not raised for '#{to_render}'!")
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue