haml-edge 2.3.206 → 2.3.207

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.206
1
+ 2.3.207
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.206
1
+ 2.3.207
data/lib/sass/engine.rb CHANGED
@@ -467,9 +467,13 @@ WARNING
467
467
 
468
468
  # If value begins with url( or ",
469
469
  # it's a CSS @import rule and we don't want to touch it.
470
- if directive == "import" && value !~ /^(url\(|["'])/
470
+ if directive == "import"
471
471
  raise SyntaxError.new("Illegal nesting: Nothing may be nested beneath import directives.",
472
472
  :line => @line + 1) unless line.children.empty?
473
+ if (match = value.match(Sass::SCSS::RX::STRING) || value.match(Sass::SCSS::RX::URI)) &&
474
+ !match.post_match.strip.empty? && match.post_match.strip[0] != ?,
475
+ return Tree::DirectiveNode.new("@import #{value}")
476
+ end
473
477
  value.split(/,\s*/).map do |f|
474
478
  f = $1 || $2 || $3 if f =~ Sass::SCSS::RX::STRING || f =~ Sass::SCSS::RX::URI
475
479
  Tree::ImportNode.new(f)
@@ -595,8 +595,8 @@ SCSS
595
595
  end
596
596
 
597
597
  def test_import_as_directive_in_sass
598
- assert_sass_to_sass '@import "foo.css"'
599
- assert_sass_to_sass '@import url(foo.css)'
598
+ assert_equal "@import foo.css\n", to_sass('@import "foo.css"')
599
+ assert_equal "@import foo.css\n", to_sass('@import url(foo.css)')
600
600
  end
601
601
 
602
602
  def test_import_as_directive_in_scss
@@ -3,7 +3,8 @@ $preconst: hello
3
3
  =premixin
4
4
  pre-mixin: here
5
5
 
6
- @import importee.sass, scss_importee, "basic.sass", basic.css, ../results/complex.css, url(partial.sass)
6
+ @import importee.sass, scss_importee, "basic.sass", basic.css, ../results/complex.css
7
+ @import url(partial.sass)
7
8
 
8
9
  nonimported
9
10
  :myconst $preconst
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.206
4
+ version: 2.3.207
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-12 00:00:00 -04:00
13
+ date: 2010-04-13 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency