Take the 2008 Git User's Survey and help out! [ hide ]

public
Description: HTML Abstraction Markup Language - A Markup Haiku
Homepage: http://haml.hamptoncatlin.com
Clone URL: git://github.com/nex3/haml.git
Search Repo:
Fix a line-reporting error in Sass.
nex3 (author)
Sat Jul 19 21:12:56 -0700 2008
commit  27cc8dc0b85f96949b2b6caf30c723ce6c28d0f4
tree    190733fab11a1d69e0b13841327080fcd9130ba3
parent  9d67c01b42f0468561f31b752d4eff8d5529a9f4
...
112
113
114
 
115
116
117
118
 
119
120
121
...
112
113
114
115
116
117
118
 
119
120
121
122
0
@@ -112,10 +112,11 @@ module Sass
0
       root = Tree::Node.new(@options[:style])
0
       index = 0
0
       while @lines[index]
0
+ old_index = index
0
         child, index = build_tree(index)
0
 
0
         if child.is_a? Tree::Node
0
- child.line = index
0
+ child.line = old_index + 1
0
           root << child
0
         elsif child.is_a? Array
0
           child.each do |c|
...
42
43
44
45
 
46
47
48
...
60
61
62
63
 
 
 
64
65
66
...
42
43
44
 
45
46
47
48
...
60
61
62
 
63
64
65
66
67
68
0
@@ -42,7 +42,7 @@ END
0
     "a\n :b c" => "4 spaces were used for indentation. Sass must be indented using two spaces.",
0
     "a\n :b c\n !d = 3" => "Constants may only be declared at the root of a document.",
0
     "!a = 1b + 2c" => "Incompatible units: b and c.",
0
- "& a\n :b c" => "Base-level rules cannot contain the parent-selector-referencing character '&'.",
0
+ "& a\n :b c" => ["Base-level rules cannot contain the parent-selector-referencing character '&'.", 1],
0
     "a\n :b\n c" => "Illegal nesting: Only attributes may be nested beneath attributes.",
0
     "a,\n :b c" => "Rules can\'t end in commas.",
0
     "a," => "Rules can\'t end in commas.",
0
@@ -60,7 +60,9 @@ END
0
     " \n \n\t\n a\n b: c" => ["Indenting at the beginning of the document is illegal.", 4],
0
 
0
     # Regression tests
0
- "a\n b:\n c\n d" => ["Illegal nesting: Only attributes may be nested beneath attributes.", 3]
0
+ "a\n b:\n c\n d" => ["Illegal nesting: Only attributes may be nested beneath attributes.", 3],
0
+ "& foo\n bar: baz\n blat: bang" => ["Base-level rules cannot contain the parent-selector-referencing character '&'.", 1],
0
+ "a\n b: c\n& foo\n bar: baz\n blat: bang" => ["Base-level rules cannot contain the parent-selector-referencing character '&'.", 3],
0
   }
0
   
0
   def test_basic_render

Comments

    No one has commented yet.