sass 3.3.0.alpha.142 → 3.3.0.alpha.144

Sign up to get free protection for your applications and to get access to all the features.
data/REVISION CHANGED
@@ -1 +1 @@
1
- 7109e242c902419c9bd839c2b4e2b8f7b48a19c7
1
+ 5a0e84467c4bbc4ac847aa17acaf1fb4dcebcfce
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.3.0.alpha.142
1
+ 3.3.0.alpha.144
data/VERSION_DATE CHANGED
@@ -1 +1 @@
1
- 24 May 2013 22:28:19 GMT
1
+ 24 May 2013 23:25:31 GMT
data/lib/sass/engine.rb CHANGED
@@ -813,7 +813,15 @@ WARNING
813
813
  parser = Sass::SCSS::Parser.new(value,
814
814
  @options[:filename], @options[:importer],
815
815
  @line, to_parser_offset(@offset))
816
- Tree::MediaNode.new(parser.parse_media_query_list.to_a)
816
+ # -1 includes the '@' into the range.
817
+ offset = line.offset + line.text.index(directive).to_i - 1
818
+ parsed_media_query_list = parser.parse_media_query_list.to_a
819
+ node = Tree::MediaNode.new(parsed_media_query_list)
820
+ node.source_range = Sass::Source::Range.new(
821
+ Sass::Source::Position.new(@line, to_parser_offset(offset)),
822
+ Sass::Source::Position.new(@line, to_parser_offset(line.offset) + line.text.length),
823
+ @options[:filename], @options[:importer])
824
+ node
817
825
  else
818
826
  unprefixed_directive = directive.gsub(/^-[a-z0-9]+-/i, '')
819
827
  if unprefixed_directive == 'supports'
@@ -558,7 +558,6 @@ module Sass
558
558
  tok!(/\{/)
559
559
  block_contents(node, context)
560
560
  tok!(/\}/)
561
- node.source_range.end_pos = source_position if node.source_range
562
561
  node
563
562
  end
564
563
 
@@ -219,6 +219,36 @@ SASS
219
219
  {{4}}@import url(baz.css){{/4}};
220
220
  {{5}}@import url(qux.css) screen print{{/5}};
221
221
 
222
+ /*@ sourceMappingURL=test.css.map */
223
+ CSS
224
+ end
225
+
226
+ def test_media_sourcemap_scss
227
+ assert_parses_with_mapping <<'SCSS', <<'CSS'
228
+ {{1}}@media screen, tv {{/1}}{
229
+ {{2}}body {{/2}}{
230
+ {{3}}max-width{{/3}}: {{4}}1070px{{/4}};
231
+ }
232
+ }
233
+ SCSS
234
+ {{1}}@media screen, tv{{/1}} {
235
+ {{2}}body{{/2}} {
236
+ {{3}}max-width{{/3}}: {{4}}1070px{{/4}}; } }
237
+
238
+ /*@ sourceMappingURL=test.css.map */
239
+ CSS
240
+ end
241
+
242
+ def test_media_sourcemap_sass
243
+ assert_parses_with_mapping <<'SASS', <<'CSS', :syntax => :sass
244
+ {{1}}@media screen, tv{{/1}}
245
+ {{2}}body{{/2}}
246
+ {{3}}max-width{{/3}}: {{4}}1070px{{/4}}
247
+ SASS
248
+ {{1}}@media screen, tv{{/1}} {
249
+ {{2}}body{{/2}} {
250
+ {{3}}max-width{{/3}}: {{4}}1070px{{/4}}; } }
251
+
222
252
  /*@ sourceMappingURL=test.css.map */
223
253
  CSS
224
254
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass
3
3
  version: !ruby/object:Gem::Version
4
- hash: 592302609
4
+ hash: 592302637
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 3
8
8
  - 3
9
9
  - 0
10
10
  - alpha
11
- - 142
12
- version: 3.3.0.alpha.142
11
+ - 144
12
+ version: 3.3.0.alpha.144
13
13
  platform: ruby
14
14
  authors:
15
15
  - Nathan Weizenbaum