mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Merge branch 'stable'
Conflicts: lib/sass/engine.rb
This commit is contained in:
commit
05ef5f963d
2 changed files with 17 additions and 1 deletions
|
@ -243,7 +243,13 @@ END
|
||||||
def parse_line(parent, line, root)
|
def parse_line(parent, line, root)
|
||||||
case line.text[0]
|
case line.text[0]
|
||||||
when ATTRIBUTE_CHAR
|
when ATTRIBUTE_CHAR
|
||||||
parse_attribute(line.text, ATTRIBUTE)
|
if line.text[1] != ATTRIBUTE_CHAR
|
||||||
|
parse_attribute(line.text, ATTRIBUTE)
|
||||||
|
else
|
||||||
|
# Support CSS3-style pseudo-elements,
|
||||||
|
# which begin with ::
|
||||||
|
Tree::RuleNode.new(line.text, @options)
|
||||||
|
end
|
||||||
when Script::VARIABLE_CHAR
|
when Script::VARIABLE_CHAR
|
||||||
parse_variable(line)
|
parse_variable(line)
|
||||||
when COMMENT_CHAR
|
when COMMENT_CHAR
|
||||||
|
|
|
@ -214,6 +214,16 @@ class SassEngineTest < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_pseudo_elements
|
||||||
|
assert_equal(<<CSS, render(<<SASS))
|
||||||
|
::first-line {
|
||||||
|
size: 10em; }
|
||||||
|
CSS
|
||||||
|
::first-line
|
||||||
|
size: 10em
|
||||||
|
SASS
|
||||||
|
end
|
||||||
|
|
||||||
def test_directive
|
def test_directive
|
||||||
assert_equal("@a b;", render("@a b"))
|
assert_equal("@a b;", render("@a b"))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue