mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Allow mixins to take precedence over sibling selectors in ambiguous cases.
This commit is contained in:
parent
d466651cff
commit
c19ad796ff
2 changed files with 1 additions and 2 deletions
|
@ -251,7 +251,7 @@ END
|
||||||
when MIXIN_DEFINITION_CHAR
|
when MIXIN_DEFINITION_CHAR
|
||||||
parse_mixin_definition(line)
|
parse_mixin_definition(line)
|
||||||
when MIXIN_INCLUDE_CHAR
|
when MIXIN_INCLUDE_CHAR
|
||||||
if line.text[1].nil? || line.text[1] == ?\s
|
if line.text[1].nil?
|
||||||
Tree::RuleNode.new(line.text, @options)
|
Tree::RuleNode.new(line.text, @options)
|
||||||
else
|
else
|
||||||
parse_mixin_include(line, root)
|
parse_mixin_include(line, root)
|
||||||
|
|
|
@ -336,7 +336,6 @@ SASS
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_mixins_dont_interfere_with_sibling_combinator
|
def test_mixins_dont_interfere_with_sibling_combinator
|
||||||
assert_equal("foo + bar {\n a: b; }\n", render("foo\n + bar\n a: b"))
|
|
||||||
assert_equal("foo + bar {\n a: b; }\nfoo + baz {\n c: d; }\n",
|
assert_equal("foo + bar {\n a: b; }\nfoo + baz {\n c: d; }\n",
|
||||||
render("foo\n +\n bar\n a: b\n baz\n c: d"))
|
render("foo\n +\n bar\n a: b\n baz\n c: d"))
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue