sass 3.3.5 → 3.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/VERSION_DATE +1 -1
- data/lib/sass/script/value/number.rb +2 -0
- data/lib/sass/scss/parser.rb +11 -5
- data/lib/sass/scss/rx.rb +1 -1
- data/test/sass/script_test.rb +5 -0
- data/test/sass/scss/css_test.rb +21 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ebb0ff4acc7bb742ad25e99839228582145f498
|
4
|
+
data.tar.gz: 9cbece862e1858dfccb32123986e2866951ee2ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11bf00f275bb42c48f4c1a1bed1066f025bf613e4f07d90065cb59c5879734e6cdd759232b01e810a4180c9d81ed4a093aa687b72fa8fdb5259d30b867ad47b7
|
7
|
+
data.tar.gz: e45333b121ba8f5c042d8fbdc27fe1ec564ec89b9b0e30f414220b93f357b697460abec18b471c8b13f6b0d442b52890861beeda68b888bfa9108ba24fe894e8
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.3.
|
1
|
+
3.3.6
|
data/VERSION_DATE
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
26 April 2014 01:17:48 UTC
|
data/lib/sass/scss/parser.rb
CHANGED
@@ -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
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
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 =
|
1240
|
+
name = source == Regexp.escape(string) ? string.inspect : rx.inspect
|
1235
1241
|
end
|
1236
1242
|
|
1237
1243
|
expected(name)
|
data/lib/sass/scss/rx.rb
CHANGED
data/test/sass/script_test.rb
CHANGED
@@ -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
|
data/test/sass/scss/css_test.rb
CHANGED
@@ -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.
|
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-
|
13
|
+
date: 2014-04-26 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: yard
|