sass 3.2.0.alpha.34 → 3.2.0.alpha.35
Sign up to get free protection for your applications and to get access to all the features.
- data/REVISION +1 -1
- data/VERSION +1 -1
- data/lib/sass/scss/parser.rb +10 -3
- data/test/sass/scss/scss_test.rb +9 -0
- metadata +1 -1
data/REVISION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
ac7e4266b54b32610016a4b8b651c9d4e18b1e62
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.2.0.alpha.
|
1
|
+
3.2.0.alpha.35
|
data/lib/sass/scss/parser.rb
CHANGED
@@ -521,7 +521,7 @@ module Sass
|
|
521
521
|
@scanner.pos = pos
|
522
522
|
@line = line
|
523
523
|
begin
|
524
|
-
expected('"{"')
|
524
|
+
throw_error {expected('"{"')}
|
525
525
|
rescue Sass::SyntaxError => e
|
526
526
|
e.message << "\n\n\"#{sel}\" may only be used at the beginning of a selector."
|
527
527
|
raise e
|
@@ -788,11 +788,11 @@ MESSAGE
|
|
788
788
|
@strs.pop
|
789
789
|
end
|
790
790
|
|
791
|
-
def str?
|
791
|
+
def str?(&block)
|
792
792
|
pos = @scanner.pos
|
793
793
|
line = @line
|
794
794
|
@strs.push ""
|
795
|
-
|
795
|
+
throw_error(&block) && @strs.last
|
796
796
|
rescue Sass::SyntaxError => e
|
797
797
|
@scanner.pos = pos
|
798
798
|
@line = line
|
@@ -875,6 +875,13 @@ MESSAGE
|
|
875
875
|
raise Sass::SyntaxError.new(msg, :line => @line)
|
876
876
|
end
|
877
877
|
|
878
|
+
def throw_error
|
879
|
+
old_throw_error, @throw_error = @throw_error, false
|
880
|
+
yield
|
881
|
+
ensure
|
882
|
+
@throw_error = old_throw_error
|
883
|
+
end
|
884
|
+
|
878
885
|
def catch_error(&block)
|
879
886
|
old_throw_error, @throw_error = @throw_error, true
|
880
887
|
pos = @scanner.pos
|
data/test/sass/scss/scss_test.rb
CHANGED
@@ -1094,6 +1094,15 @@ SCSS
|
|
1094
1094
|
|
1095
1095
|
# Regression
|
1096
1096
|
|
1097
|
+
def test_star_plus_and_parent
|
1098
|
+
assert_equal <<CSS, render(<<SCSS)
|
1099
|
+
* + html foo {
|
1100
|
+
a: b; }
|
1101
|
+
CSS
|
1102
|
+
foo {*+html & {a: b}}
|
1103
|
+
SCSS
|
1104
|
+
end
|
1105
|
+
|
1097
1106
|
def test_weird_added_space
|
1098
1107
|
assert_equal <<CSS, render(<<SCSS)
|
1099
1108
|
foo {
|