sass 3.2.0.alpha.75 → 3.2.0.alpha.76
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.
- data/REVISION +1 -1
- data/VERSION +1 -1
- data/lib/sass/scss/parser.rb +2 -2
- data/lib/sass/tree/node.rb +2 -2
- data/lib/sass/tree/visitors/check_nesting.rb +2 -2
- data/lib/sass/util.rb +6 -6
- metadata +4 -4
data/REVISION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
02ece03560e12575005f7583a43d4e999823447d
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.2.0.alpha.
|
1
|
+
3.2.0.alpha.76
|
data/lib/sass/scss/parser.rb
CHANGED
@@ -835,11 +835,11 @@ MESSAGE
|
|
835
835
|
@strs.pop
|
836
836
|
end
|
837
837
|
|
838
|
-
def str?
|
838
|
+
def str?(&block)
|
839
839
|
pos = @scanner.pos
|
840
840
|
line = @line
|
841
841
|
@strs.push ""
|
842
|
-
throw_error
|
842
|
+
throw_error(&block) && @strs.last
|
843
843
|
rescue Sass::SyntaxError => e
|
844
844
|
@scanner.pos = pos
|
845
845
|
@line = line
|
data/lib/sass/tree/node.rb
CHANGED
@@ -159,9 +159,9 @@ module Sass
|
|
159
159
|
#
|
160
160
|
# @yield node
|
161
161
|
# @yieldparam node [Node] a node in the tree
|
162
|
-
def each
|
162
|
+
def each(&block)
|
163
163
|
yield self
|
164
|
-
children.each {|c| c.each
|
164
|
+
children.each {|c| c.each(&block)}
|
165
165
|
end
|
166
166
|
|
167
167
|
# Converts a node to Sass code that will generate it.
|
@@ -143,9 +143,9 @@ class Sass::Tree::Visitors::CheckNesting < Sass::Tree::Visitors::Base
|
|
143
143
|
return false
|
144
144
|
end
|
145
145
|
|
146
|
-
def try_send(method, *args)
|
146
|
+
def try_send(method, *args, &block)
|
147
147
|
return unless respond_to?(method)
|
148
|
-
send(method, *args)
|
148
|
+
send(method, *args, &block)
|
149
149
|
end
|
150
150
|
end
|
151
151
|
|
data/lib/sass/util.rb
CHANGED
@@ -212,11 +212,11 @@ module Sass
|
|
212
212
|
# @yieldreturn [Object, nil] If the two values register as equal,
|
213
213
|
# this will return the value to use in the LCS array.
|
214
214
|
# @return [Array] The LCS
|
215
|
-
def lcs(x, y)
|
215
|
+
def lcs(x, y, &block)
|
216
216
|
x = [nil, *x]
|
217
217
|
y = [nil, *y]
|
218
218
|
block ||= proc {|a, b| a == b && a}
|
219
|
-
lcs_backtrace(lcs_table(x, y
|
219
|
+
lcs_backtrace(lcs_table(x, y, &block), x, y, x.size-1, y.size-1, &block)
|
220
220
|
end
|
221
221
|
|
222
222
|
# Converts a Hash to an Array. This is usually identical to `Hash#to_a`,
|
@@ -763,14 +763,14 @@ MSG
|
|
763
763
|
|
764
764
|
# Computes a single longest common subsequence for arrays x and y.
|
765
765
|
# Algorithm from [Wikipedia](http://en.wikipedia.org/wiki/Longest_common_subsequence_problem#Reading_out_an_LCS)
|
766
|
-
def lcs_backtrace(c, x, y, i, j)
|
766
|
+
def lcs_backtrace(c, x, y, i, j, &block)
|
767
767
|
return [] if i == 0 || j == 0
|
768
768
|
if v = yield(x[i], y[j])
|
769
|
-
return lcs_backtrace(c, x, y, i-1, j-1
|
769
|
+
return lcs_backtrace(c, x, y, i-1, j-1, &block) << v
|
770
770
|
end
|
771
771
|
|
772
|
-
return lcs_backtrace(c, x, y, i, j-1
|
773
|
-
return lcs_backtrace(c, x, y, i-1, j
|
772
|
+
return lcs_backtrace(c, x, y, i, j-1, &block) if c[i][j-1] > c[i-1][j]
|
773
|
+
return lcs_backtrace(c, x, y, i-1, j, &block)
|
774
774
|
end
|
775
775
|
end
|
776
776
|
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:
|
4
|
+
hash: 592302981
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 2
|
9
9
|
- 0
|
10
10
|
- alpha
|
11
|
-
-
|
12
|
-
version: 3.2.0.alpha.
|
11
|
+
- 76
|
12
|
+
version: 3.2.0.alpha.76
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Nathan Weizenbaum
|
@@ -151,7 +151,6 @@ files:
|
|
151
151
|
- lib/sass/tree/root_node.rb
|
152
152
|
- lib/sass/tree/rule_node.rb
|
153
153
|
- lib/sass/tree/content_node.rb
|
154
|
-
- lib/sass/tree/trace_node.rb
|
155
154
|
- lib/sass/tree/variable_node.rb
|
156
155
|
- lib/sass/tree/visitors/base.rb
|
157
156
|
- lib/sass/tree/visitors/check_nesting.rb
|
@@ -163,6 +162,7 @@ files:
|
|
163
162
|
- lib/sass/tree/visitors/to_css.rb
|
164
163
|
- lib/sass/tree/warn_node.rb
|
165
164
|
- lib/sass/tree/while_node.rb
|
165
|
+
- lib/sass/tree/trace_node.rb
|
166
166
|
- lib/sass/media.rb
|
167
167
|
- lib/sass/util/multibyte_string_scanner.rb
|
168
168
|
- lib/sass/util/subset_map.rb
|