mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Merge branch 'master' into yard
Conflicts: lib/sass/tree/attr_node.rb
This commit is contained in:
commit
65991b34d9
2 changed files with 7 additions and 5 deletions
|
@ -48,13 +48,13 @@ module Sass::Tree
|
||||||
end
|
end
|
||||||
|
|
||||||
if value[-1] == ?;
|
if value[-1] == ?;
|
||||||
raise Sass::SyntaxError.new("Invalid attribute: #{declaration.dump} (This isn't CSS!).", @line)
|
raise Sass::SyntaxError.new("Invalid attribute: #{declaration.dump} (no \";\" required at end-of-line).", @line)
|
||||||
end
|
end
|
||||||
real_name = name
|
real_name = name
|
||||||
real_name = "#{parent_name}-#{real_name}" if parent_name
|
real_name = "#{parent_name}-#{real_name}" if parent_name
|
||||||
|
|
||||||
if value.empty? && children.empty?
|
if value.empty? && children.empty?
|
||||||
raise Sass::SyntaxError.new("Invalid attribute: #{declaration.dump}.", @line)
|
raise Sass::SyntaxError.new("Invalid attribute: #{declaration.dump} (no value).", @line)
|
||||||
end
|
end
|
||||||
|
|
||||||
join_string = case style
|
join_string = case style
|
||||||
|
@ -103,7 +103,7 @@ module Sass::Tree
|
||||||
private
|
private
|
||||||
|
|
||||||
def declaration
|
def declaration
|
||||||
":#{name} #{value}"
|
@attr_syntax == :new ? "#{name}: #{value}" : ":#{name} #{value}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,11 +18,13 @@ class SassEngineTest < Test::Unit::TestCase
|
||||||
":" => 'Invalid attribute: ":".',
|
":" => 'Invalid attribute: ":".',
|
||||||
": a" => 'Invalid attribute: ": a".',
|
": a" => 'Invalid attribute: ": a".',
|
||||||
":= a" => 'Invalid attribute: ":= a".',
|
":= a" => 'Invalid attribute: ":= a".',
|
||||||
"a\n :b" => 'Invalid attribute: ":b ".',
|
"a\n :b" => 'Invalid attribute: ":b " (no value).',
|
||||||
|
"a\n b:" => 'Invalid attribute: "b: " (no value).',
|
||||||
"a\n :b: c" => 'Invalid attribute: ":b: c".',
|
"a\n :b: c" => 'Invalid attribute: ":b: c".',
|
||||||
"a\n :b:c d" => 'Invalid attribute: ":b:c d".',
|
"a\n :b:c d" => 'Invalid attribute: ":b:c d".',
|
||||||
"a\n :b=c d" => 'Invalid attribute: ":b=c d".',
|
"a\n :b=c d" => 'Invalid attribute: ":b=c d".',
|
||||||
"a\n :b c;" => 'Invalid attribute: ":b c;" (This isn\'t CSS!).',
|
"a\n :b c;" => 'Invalid attribute: ":b c;" (no ";" required at end-of-line).',
|
||||||
|
"a\n b: c;" => 'Invalid attribute: "b: c;" (no ";" required at end-of-line).',
|
||||||
"a\n b : c" => 'Invalid attribute: "b : c".',
|
"a\n b : c" => 'Invalid attribute: "b : c".',
|
||||||
"a\n b=c: d" => 'Invalid attribute: "b=c: d".',
|
"a\n b=c: d" => 'Invalid attribute: "b=c: d".',
|
||||||
":a" => 'Attributes aren\'t allowed at the root of a document.',
|
":a" => 'Attributes aren\'t allowed at the root of a document.',
|
||||||
|
|
Loading…
Add table
Reference in a new issue