haml-edge 2.1.17 → 2.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/EDGE_GEM_VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.17
1
+ 2.1.18
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.17
1
+ 2.1.18
@@ -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} (This isn't CSS!).", @line)
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)
@@ -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;" (This isn\'t CSS!).',
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.',
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haml-edge
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.17
4
+ version: 2.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Weizenbaum