sass 3.3.5 → 3.3.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 81425a4314bf7725f3105352c3183b0a343cfab3
4
- data.tar.gz: f710dbd2f261a531615cf1f0c481facf6b09a3c6
3
+ metadata.gz: 8ebb0ff4acc7bb742ad25e99839228582145f498
4
+ data.tar.gz: 9cbece862e1858dfccb32123986e2866951ee2ca
5
5
  SHA512:
6
- metadata.gz: 2ed089312445cd14de0ae19217c49fca73c76d84c9ffb83a82afb0cd3eea23c8386559968406d37bf241763523ebca199f1761a8821a40d25cc7d78c89d85498
7
- data.tar.gz: 341822fc88d07d4c5e43eca03286bf84546c5988fdc47bacd5e844563f2feaa8f3b8973717302001c423bd3319b8d4c88623195c299fbe2d2302611505d81a5e
6
+ metadata.gz: 11bf00f275bb42c48f4c1a1bed1066f025bf613e4f07d90065cb59c5879734e6cdd759232b01e810a4180c9d81ed4a093aa687b72fa8fdb5259d30b867ad47b7
7
+ data.tar.gz: e45333b121ba8f5c042d8fbdc27fe1ec564ec89b9b0e30f414220b93f357b697460abec18b471c8b13f6b0d442b52890861beeda68b888bfa9108ba24fe894e8
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.3.5
1
+ 3.3.6
@@ -1 +1 @@
1
- 15 April 2014 02:38:11 UTC
1
+ 26 April 2014 01:17:48 UTC
@@ -271,6 +271,8 @@ module Sass::Script::Value
271
271
  #
272
272
  # @return [String] The representation
273
273
  def inspect(opts = {})
274
+ return original if original
275
+
274
276
  value = self.class.round(self.value)
275
277
  str = value.to_s
276
278
 
@@ -155,10 +155,15 @@ module Sass
155
155
  else
156
156
  value = Sass::Engine.parse_interp(
157
157
  text, line, @scanner.pos - text.size, :filename => @filename)
158
- value.unshift(@scanner.
159
- string[0...@scanner.pos].
160
- reverse[/.*?\*\/(.*?)($|\Z)/, 1].
161
- reverse.gsub(/[^\s]/, ' '))
158
+ string_before_comment = @scanner.string[0...@scanner.pos - text.length]
159
+ newline_before_comment = string_before_comment.rindex("\n")
160
+ last_line_before_comment =
161
+ if newline_before_comment
162
+ string_before_comment[newline_before_comment + 1..-1]
163
+ else
164
+ string_before_comment
165
+ end
166
+ value.unshift(last_line_before_comment.gsub(/[^\s]/, ' '))
162
167
  end
163
168
 
164
169
  type = if silent
@@ -1230,8 +1235,9 @@ MESSAGE
1230
1235
 
1231
1236
  unless name
1232
1237
  # Display basic regexps as plain old strings
1238
+ source = rx.source.gsub(%r{\\/}, '/')
1233
1239
  string = rx.source.gsub(/\\(.)/, '\1')
1234
- name = rx.source == Regexp.escape(string) ? string.inspect : rx.inspect
1240
+ name = source == Regexp.escape(string) ? string.inspect : rx.inspect
1235
1241
  end
1236
1242
 
1237
1243
  expected(name)
@@ -80,7 +80,7 @@ module Sass
80
80
 
81
81
  S = /[ \t\r\n\f]+/
82
82
 
83
- COMMENT = %r{/\*[^*]*\*+(?:[^/][^*]*\*+)*/}
83
+ COMMENT = %r{/\*([^*]|\*+[^/*])*\**\*/}
84
84
  SINGLE_LINE_COMMENT = %r{//.*(\n[ \t]*//.*)*}
85
85
 
86
86
  CDO = quote("<!--")
@@ -690,6 +690,11 @@ SCSS
690
690
 
691
691
  # Regression Tests
692
692
 
693
+ def test_inspect_divided_numbers
694
+ assert_equal "1px/2px", resolve("inspect(1px/2px)")
695
+ assert_equal "0.5", resolve("inspect((1px/2px))")
696
+ end
697
+
693
698
  def test_minus_without_whitespace
694
699
  assert_equal "5px", resolve("15px-10px")
695
700
  end
@@ -1016,6 +1016,27 @@ SCSS
1016
1016
 
1017
1017
  ## Regressions
1018
1018
 
1019
+ def test_very_long_comment_doesnt_take_forever
1020
+ string = 'asdf' * (100000)
1021
+ assert_equal(<<CSS, render(<<SCSS))
1022
+ /*
1023
+ #{string}
1024
+ */
1025
+ CSS
1026
+ /*
1027
+ #{string}
1028
+ */
1029
+ SCSS
1030
+ end
1031
+
1032
+ def test_long_unclosed_comment_doesnt_take_forever
1033
+ assert_raise_message(Sass::SyntaxError,
1034
+ 'Invalid CSS after "/*": expected "/", was "//*************..."') {render(<<SCSS)}
1035
+ /*
1036
+ //**************************************************************************
1037
+ SCSS
1038
+ end
1039
+
1019
1040
  def test_double_space_string
1020
1041
  assert_equal(<<CSS, render(<<SCSS))
1021
1042
  .a {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.5
4
+ version: 3.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Weizenbaum
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-04-15 00:00:00.000000000 Z
13
+ date: 2014-04-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: yard