sass 3.1.9 → 3.1.10

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/VERSION CHANGED
@@ -1 +1 @@
1
- 3.1.9
1
+ 3.1.10
@@ -516,7 +516,7 @@ module Sass
516
516
 
517
517
  if sel =~ /^&/
518
518
  begin
519
- expected('"{"')
519
+ throw_error {expected('"{"')}
520
520
  rescue Sass::SyntaxError => e
521
521
  e.message << "\n\n\"#{sel}\" may only be used at the beginning of a selector."
522
522
  raise e
@@ -790,11 +790,11 @@ MESSAGE
790
790
  @strs.pop
791
791
  end
792
792
 
793
- def str?
793
+ def str?(&block)
794
794
  pos = @scanner.pos
795
795
  line = @line
796
796
  @strs.push ""
797
- yield && @strs.last
797
+ throw_error(&block) && @strs.last
798
798
  rescue Sass::SyntaxError => e
799
799
  @scanner.pos = pos
800
800
  @line = line
@@ -877,6 +877,13 @@ MESSAGE
877
877
  raise Sass::SyntaxError.new(msg, :line => @line)
878
878
  end
879
879
 
880
+ def throw_error
881
+ old_throw_error, @throw_error = @throw_error, false
882
+ yield
883
+ ensure
884
+ @throw_error = old_throw_error
885
+ end
886
+
880
887
  def catch_error(&block)
881
888
  old_throw_error, @throw_error = @throw_error, true
882
889
  pos = @scanner.pos
@@ -1095,6 +1095,15 @@ SCSS
1095
1095
 
1096
1096
  # Regression
1097
1097
 
1098
+ def test_star_plus_and_parent
1099
+ assert_equal <<CSS, render(<<SCSS)
1100
+ * + html foo {
1101
+ a: b; }
1102
+ CSS
1103
+ foo {*+html & {a: b}}
1104
+ SCSS
1105
+ end
1106
+
1098
1107
  def test_weird_added_space
1099
1108
  assert_equal <<CSS, render(<<SCSS)
1100
1109
  foo {
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 3
8
8
  - 1
9
- - 9
10
- version: 3.1.9
9
+ - 10
10
+ version: 3.1.10
11
11
  platform: ruby
12
12
  authors:
13
13
  - Nathan Weizenbaum