haml-edge 2.3.212 → 2.3.213

Sign up to get free protection for your applications and to get access to all the features.
data/EDGE_GEM_VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.212
1
+ 2.3.213
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.212
1
+ 2.3.213
data/lib/sass/engine.rb CHANGED
@@ -408,11 +408,15 @@ WARNING
408
408
  return Tree::RuleNode.new(parse_interp(line.text))
409
409
  end
410
410
  res.unshift(hack_char) if hack_char
411
+ if comment = scanner.scan(Sass::SCSS::RX::COMMENT)
412
+ res << comment
413
+ end
411
414
 
412
415
  name = line.text[0...scanner.pos]
413
416
  if scanner.scan(/\s*([:=])(?:\s|$)/)
414
417
  parse_property(name, res, scanner[1], scanner.rest, :new, line)
415
418
  else
419
+ res.pop if comment
416
420
  Tree::RuleNode.new(res + parse_interp(scanner.rest))
417
421
  end
418
422
  end
@@ -538,6 +538,9 @@ module Sass
538
538
  return unless name = interp_ident
539
539
  name = [name] if name.is_a?(String)
540
540
  end
541
+ if comment = tok(COMMENT)
542
+ name << comment
543
+ end
541
544
  ss
542
545
 
543
546
  tok!(/:/)
@@ -15,7 +15,7 @@ module Sass
15
15
  # Used for error reporting
16
16
  # @return [Selector::CommaSequence] The parsed selector
17
17
  # @raise [Sass::SyntaxError] if there's a syntax error in the selector
18
- def parse_selector(line, filename)
18
+ def parse_selector(filename)
19
19
  init_scanner!
20
20
  selectors = [expr!(:_selector)]
21
21
  while tok(/,/)
@@ -25,7 +25,7 @@ module Sass
25
25
  end
26
26
  expected("selector") unless @scanner.eos?
27
27
  seq = Selector::CommaSequence.new(selectors)
28
- seq.line = line
28
+ seq.line = @line
29
29
  seq.filename = filename
30
30
  seq
31
31
  end
@@ -52,8 +52,8 @@ module Sass::Tree
52
52
  # @param environment [Sass::Environment] The lexical environment containing
53
53
  # variable and mixin values
54
54
  def perform!(environment)
55
- @resolved_selector = Sass::SCSS::CssParser.new(run_interp(@selector, environment)).
56
- parse_selector(self.line, self.filename)
55
+ @resolved_selector = Sass::SCSS::CssParser.new(run_interp(@selector, environment), self.line).
56
+ parse_selector(self.filename)
57
57
  super
58
58
  end
59
59
  end
@@ -191,8 +191,8 @@ module Sass::Tree
191
191
  # @param environment [Sass::Environment] The lexical environment containing
192
192
  # variable and mixin values
193
193
  def perform!(environment)
194
- @parsed_rules = Sass::SCSS::StaticParser.new(run_interp(@rule, environment)).
195
- parse_selector(self.line, self.filename)
194
+ @parsed_rules = Sass::SCSS::StaticParser.new(run_interp(@rule, environment), self.line).
195
+ parse_selector(self.filename)
196
196
  super
197
197
  end
198
198
 
@@ -872,6 +872,8 @@ foo
872
872
  *name: val
873
873
  #name: val
874
874
  .name: val
875
+ name/**/: val
876
+ name/*\\**/: val
875
877
  name: val
876
878
  SASS
877
879
  foo {
@@ -879,6 +881,8 @@ foo {
879
881
  *name: val;
880
882
  #name: val;
881
883
  .name: val;
884
+ name/**/: val;
885
+ name/*\\**/: val;
882
886
  name: val; }
883
887
  SCSS
884
888
  end
@@ -32,6 +32,8 @@ MSG
32
32
  "a\n :b:c d" => 'Invalid property: ":b:c d".',
33
33
  "a\n :b c;" => 'Invalid CSS after "c": expected expression (e.g. 1px, bold), was ";"',
34
34
  "a\n b: c;" => 'Invalid CSS after "c": expected expression (e.g. 1px, bold), was ";"',
35
+ ".foo ^bar\n a: b" => ['Invalid CSS after ".foo ": expected selector, was "^bar"', 1],
36
+ "a\n @extend .foo ^bar" => 'Invalid CSS after ".foo ": expected selector, was "^bar"',
35
37
  "a: b" => 'Properties aren\'t allowed at the root of a document.',
36
38
  ":a b" => 'Properties aren\'t allowed at the root of a document.',
37
39
  "!" => 'Invalid variable: "!".',
@@ -599,6 +601,8 @@ foo {
599
601
  *name: val;
600
602
  #name: val;
601
603
  .name: val;
604
+ name/**/: val;
605
+ name/*\\**/: val;
602
606
  name: val; }
603
607
  CSS
604
608
  foo
@@ -606,6 +610,8 @@ foo
606
610
  *name: val
607
611
  #name: val
608
612
  .name: val
613
+ name/**/: val
614
+ name/*\\**/: val
609
615
  name: val
610
616
  SASS
611
617
  end
@@ -349,6 +349,8 @@ foo {
349
349
  :name: val;
350
350
  .name: val;
351
351
  #name: val;
352
+ name/**/: val;
353
+ name/*\\**/: val;
352
354
  name: val; }
353
355
  SCSS
354
356
  end
@@ -942,9 +942,11 @@ SCSS
942
942
  end
943
943
 
944
944
  def test_post_resolution_selector_error
945
- assert_raise(Sass::SyntaxError, 'Invalid CSS after "foo ": expected selector, was ") bar"') do
946
- render 'foo #{") bar"} {a: b}'
947
- end
945
+ render "\n\nfoo \#{\") bar\"} {a: b}"
946
+ assert(false, "Expected syntax error")
947
+ rescue Sass::SyntaxError => e
948
+ assert_equal 'Invalid CSS after "foo ": expected selector, was ") bar"', e.message
949
+ assert_equal 3, e.sass_line
948
950
  end
949
951
 
950
952
  def test_parent_in_mid_selector_error
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haml-edge
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.212
4
+ version: 2.3.213
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Weizenbaum