haml-edge 2.3.190 → 2.3.191

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.190
1
+ 2.3.191
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.190
1
+ 2.3.191
data/lib/haml/exec.rb CHANGED
@@ -602,7 +602,7 @@ END
602
602
  end
603
603
 
604
604
  opts.on('--dasherize', 'Convert underscores to dashes') do
605
- @options[:dasherize] = true
605
+ @options[:for_tree][:dasherize] = true
606
606
  end
607
607
 
608
608
  opts.on('--old', 'Output the old-style ":prop val" property syntax.',
@@ -84,7 +84,7 @@ module Sass::Script
84
84
  private
85
85
 
86
86
  def operand_to_sass(pred, op, opts = {})
87
- return "(#{op.to_sass})" if op.is_a?(Operation) &&
87
+ return "(#{op.to_sass(opts)})" if op.is_a?(Operation) &&
88
88
  Sass::Script::Parser.precedence_of(op.operator) < pred
89
89
  op.to_sass(opts)
90
90
  end
@@ -259,18 +259,6 @@ module Sass
259
259
  tok(/[+-]/)
260
260
  end
261
261
 
262
- def property
263
- return unless e = (tok(IDENT) || interpolation)
264
- res = [e, str{ss}]
265
-
266
- while e = (interpolation || tok(IDENT))
267
- res << e
268
- end
269
-
270
- ss
271
- res
272
- end
273
-
274
262
  def ruleset
275
263
  rules = []
276
264
  return unless v = selector
@@ -395,10 +383,10 @@ module Sass
395
383
  end
396
384
 
397
385
  def element_name
398
- return unless name = tok(IDENT) || tok(/\*/) || tok?(/\|/)
386
+ return unless name = interp_ident || tok(/\*/) || tok?(/\|/)
399
387
  if tok(/\|/)
400
388
  @expected = "element name or *"
401
- name << "|" << (tok(IDENT) || tok!(/\*/))
389
+ name << "|" << (interp_ident || tok!(/\*/))
402
390
  end
403
391
  name
404
392
  end
@@ -468,10 +456,12 @@ module Sass
468
456
  # This allows the "*prop: val", ":prop: val", and ".prop: val" hacks
469
457
  if s = tok(/[:\*\.]/)
470
458
  @use_property_exception = s != '.'
471
- name = [s, str{ss}] + expr!(:property)
459
+ name = [s, str{ss}, *expr!(:interp_ident)]
472
460
  else
473
- return unless name = property
461
+ return unless name = interp_ident
462
+ name = [name] if name.is_a?(String)
474
463
  end
464
+ ss
475
465
 
476
466
  @expected = expected_property_separator
477
467
  space, value = expr!(:value)
@@ -576,10 +566,10 @@ MESSAGE
576
566
  res
577
567
  end
578
568
 
579
- def interp_ident(ident = IDENT)
580
- return unless val = tok(ident) || interpolation
569
+ def interp_ident(start = IDENT)
570
+ return unless val = tok(start) || interpolation
581
571
  res = [val]
582
- while val = tok(ident) || interpolation
572
+ while val = tok(NAME) || interpolation
583
573
  res << val
584
574
  end
585
575
  res
@@ -671,6 +671,17 @@ $zzz: zzz;
671
671
  SCSS
672
672
  end
673
673
 
674
+ def test_selector_interpolation_at_dashes
675
+ assert_equal <<CSS, render(<<SCSS)
676
+ div {
677
+ -foo-a-b-foo: foo; }
678
+ CSS
679
+ $a : a;
680
+ $b : b;
681
+ div { -foo-\#{$a}-\#{$b}-foo: foo }
682
+ SCSS
683
+ end
684
+
674
685
  def test_basic_prop_val_interpolation
675
686
  assert_equal <<CSS, render(<<SCSS)
676
687
  foo {
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.190
4
+ version: 2.3.191
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Weizenbaum
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2010-04-04 00:00:00 -04:00
13
+ date: 2010-04-06 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency