sass 3.7.1 → 3.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/VERSION +1 -1
- data/VERSION_DATE +1 -1
- data/lib/sass/scss/css_parser.rb +6 -1
- data/lib/sass/scss/parser.rb +3 -2
- data/lib/sass/selector/pseudo.rb +1 -1
- data/lib/sass/tree/rule_node.rb +2 -1
- data/lib/sass/tree/visitors/perform.rb +1 -1
- data/lib/sass/tree/visitors/to_css.rb +1 -1
- data/lib/sass/util.rb +22 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6d321485d2c75f84d8d1dca9e7f0688e89fea8b4
|
4
|
+
data.tar.gz: '00048a6f7bf6aebc4cfa315c5e310cd6dce1958e'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c7f5ac95eb72221900787e775cf5fe666f3dc3847cf8f995e0ee31baaec4792c8db82f680e2b8442e61b3962cb4384dc05d5a1b024c8f1dfebba76f2e736451
|
7
|
+
data.tar.gz: b11807d9fd6fc877e2a1649e55fd7ab84162704c949df3548c1471548da3a8170fc3192e08a5d1dfe534d66a03629518cc69e966a65031b28450c22b0f956a7b
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.7.
|
1
|
+
3.7.2
|
data/VERSION_DATE
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
08 November 2018 22:42:57 UTC
|
data/lib/sass/scss/css_parser.rb
CHANGED
@@ -47,7 +47,12 @@ module Sass
|
|
47
47
|
def keyframes_ruleset
|
48
48
|
start_pos = source_position
|
49
49
|
return unless (selector = keyframes_selector)
|
50
|
-
block(
|
50
|
+
block(
|
51
|
+
node(
|
52
|
+
Sass::Tree::KeyframeRuleNode.new(
|
53
|
+
Sass::Util.strip_except_escapes(selector)),
|
54
|
+
start_pos),
|
55
|
+
:ruleset)
|
51
56
|
end
|
52
57
|
|
53
58
|
@sass_script_parser = Sass::Script::CssParser
|
data/lib/sass/scss/parser.rb
CHANGED
@@ -992,8 +992,9 @@ module Sass
|
|
992
992
|
# This results in a dramatic speed increase.
|
993
993
|
if (val = tok(STATIC_VALUE))
|
994
994
|
# If val ends with escaped whitespace, leave it be.
|
995
|
-
|
996
|
-
|
995
|
+
str = Sass::Script::Tree::Literal.new(
|
996
|
+
Sass::Script::Value::String.new(
|
997
|
+
Sass::Util.strip_except_escapes(val)))
|
997
998
|
str.line = start_pos.line
|
998
999
|
str.source_range = range(start_pos)
|
999
1000
|
return str
|
data/lib/sass/selector/pseudo.rb
CHANGED
@@ -134,7 +134,7 @@ module Sass
|
|
134
134
|
res = (syntactic_type == :class ? ":" : "::") + @name
|
135
135
|
if @arg || @selector
|
136
136
|
res << "("
|
137
|
-
res << @arg
|
137
|
+
res << Sass::Util.strip_except_escapes(@arg) if @arg
|
138
138
|
res << " " if @arg && @selector
|
139
139
|
res << @selector.to_s(opts) if @selector
|
140
140
|
res << ")"
|
data/lib/sass/tree/rule_node.rb
CHANGED
@@ -140,7 +140,8 @@ module Sass::Tree
|
|
140
140
|
# When we get it, we'll set it on the parsed rules if possible.
|
141
141
|
parser = nil
|
142
142
|
warnings = Sass.logger.capture do
|
143
|
-
parser = Sass::SCSS::StaticParser.new(
|
143
|
+
parser = Sass::SCSS::StaticParser.new(
|
144
|
+
Sass::Util.strip_except_escapes(@rule.join), nil, nil, 1)
|
144
145
|
@parsed_rules = parser.parse_selector rescue nil
|
145
146
|
end
|
146
147
|
|
@@ -298,7 +298,7 @@ class Sass::Tree::Visitors::ToCss < Sass::Tree::Visitors::Base
|
|
298
298
|
rule_part.gsub!(/nth([^( ]*)\(([^)]*)\)/m) do |match|
|
299
299
|
match.tr(" \t\n", "")
|
300
300
|
end
|
301
|
-
rule_part.
|
301
|
+
rule_part = Sass::Util.strip_except_escapes(rule_part)
|
302
302
|
end
|
303
303
|
rule_part
|
304
304
|
end.compact.join(rule_separator)
|
data/lib/sass/util.rb
CHANGED
@@ -246,15 +246,15 @@ module Sass
|
|
246
246
|
res
|
247
247
|
end
|
248
248
|
|
249
|
-
# Destructively strips whitespace from the beginning and end
|
250
|
-
#
|
251
|
-
#
|
249
|
+
# Destructively strips whitespace from the beginning and end of the first
|
250
|
+
# and last elements, respectively, in the array (if those elements are
|
251
|
+
# strings). Preserves CSS escapes at the end of the array.
|
252
252
|
#
|
253
253
|
# @param arr [Array]
|
254
254
|
# @return [Array] `arr`
|
255
255
|
def strip_string_array(arr)
|
256
256
|
arr.first.lstrip! if arr.first.is_a?(String)
|
257
|
-
arr.
|
257
|
+
arr[-1] = Sass::Util.rstrip_except_escapes(arr[-1]) if arr.last.is_a?(String)
|
258
258
|
arr
|
259
259
|
end
|
260
260
|
|
@@ -289,6 +289,24 @@ module Sass
|
|
289
289
|
end
|
290
290
|
end
|
291
291
|
|
292
|
+
# Like [String#strip], but preserves escaped whitespace at the end of the
|
293
|
+
# string.
|
294
|
+
#
|
295
|
+
# @param string [String]
|
296
|
+
# @return [String]
|
297
|
+
def strip_except_escapes(string)
|
298
|
+
rstrip_except_escapes(string.lstrip)
|
299
|
+
end
|
300
|
+
|
301
|
+
# Like [String#rstrip], but preserves escaped whitespace at the end of the
|
302
|
+
# string.
|
303
|
+
#
|
304
|
+
# @param string [String]
|
305
|
+
# @return [String]
|
306
|
+
def rstrip_except_escapes(string)
|
307
|
+
string.sub(/(?<!\\)\s+$/, '')
|
308
|
+
end
|
309
|
+
|
292
310
|
# Return an array of all possible paths through the given arrays.
|
293
311
|
#
|
294
312
|
# @param arrs [Array<Array>]
|
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.7.
|
4
|
+
version: 3.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Natalie Weizenbaum
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-11-
|
13
|
+
date: 2018-11-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: sass-listen
|
@@ -276,7 +276,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
276
276
|
version: '0'
|
277
277
|
requirements: []
|
278
278
|
rubyforge_project: sass
|
279
|
-
rubygems_version: 2.
|
279
|
+
rubygems_version: 2.6.14
|
280
280
|
signing_key:
|
281
281
|
specification_version: 4
|
282
282
|
summary: A powerful but elegant CSS compiler that makes CSS fun again.
|