haml-edge 2.1.17 → 2.1.18
Sign up to get free protection for your applications and to get access to all the features.
- data/EDGE_GEM_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/sass/tree/attr_node.rb +3 -3
- data/test/sass/engine_test.rb +4 -2
- metadata +1 -1
data/EDGE_GEM_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1.
|
1
|
+
2.1.18
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1.
|
1
|
+
2.1.18
|
data/lib/sass/tree/attr_node.rb
CHANGED
@@ -21,13 +21,13 @@ module Sass::Tree
|
|
21
21
|
end
|
22
22
|
|
23
23
|
if value[-1] == ?;
|
24
|
-
raise Sass::SyntaxError.new("Invalid attribute: #{declaration.dump} (
|
24
|
+
raise Sass::SyntaxError.new("Invalid attribute: #{declaration.dump} (no \";\" required at end-of-line).", @line)
|
25
25
|
end
|
26
26
|
real_name = name
|
27
27
|
real_name = "#{parent_name}-#{real_name}" if parent_name
|
28
28
|
|
29
29
|
if value.empty? && children.empty?
|
30
|
-
raise Sass::SyntaxError.new("Invalid attribute: #{declaration.dump}.", @line)
|
30
|
+
raise Sass::SyntaxError.new("Invalid attribute: #{declaration.dump} (no value).", @line)
|
31
31
|
end
|
32
32
|
|
33
33
|
join_string = case style
|
@@ -60,7 +60,7 @@ module Sass::Tree
|
|
60
60
|
private
|
61
61
|
|
62
62
|
def declaration
|
63
|
-
":#{name} #{value}"
|
63
|
+
@attr_syntax == :new ? "#{name}: #{value}" : ":#{name} #{value}"
|
64
64
|
end
|
65
65
|
|
66
66
|
def invalid_child?(child)
|
data/test/sass/engine_test.rb
CHANGED
@@ -18,11 +18,13 @@ class SassEngineTest < Test::Unit::TestCase
|
|
18
18
|
":" => 'Invalid attribute: ":".',
|
19
19
|
": a" => 'Invalid attribute: ": a".',
|
20
20
|
":= a" => 'Invalid attribute: ":= a".',
|
21
|
-
"a\n :b" => 'Invalid attribute: ":b ".',
|
21
|
+
"a\n :b" => 'Invalid attribute: ":b " (no value).',
|
22
|
+
"a\n b:" => 'Invalid attribute: "b: " (no value).',
|
22
23
|
"a\n :b: c" => 'Invalid attribute: ":b: c".',
|
23
24
|
"a\n :b:c d" => 'Invalid attribute: ":b:c d".',
|
24
25
|
"a\n :b=c d" => 'Invalid attribute: ":b=c d".',
|
25
|
-
"a\n :b c;" => 'Invalid attribute: ":b c;" (
|
26
|
+
"a\n :b c;" => 'Invalid attribute: ":b c;" (no ";" required at end-of-line).',
|
27
|
+
"a\n b: c;" => 'Invalid attribute: "b: c;" (no ";" required at end-of-line).',
|
26
28
|
"a\n b : c" => 'Invalid attribute: "b : c".',
|
27
29
|
"a\n b=c: d" => 'Invalid attribute: "b=c: d".',
|
28
30
|
":a" => 'Attributes aren\'t allowed at the root of a document.',
|