line-tree 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/line-tree.rb +23 -9
- metadata +4 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1466817b8694f84b089e0e025c2de227ea87f8122b10d8e85087130b5af6e2a7
|
4
|
+
data.tar.gz: cc8aa9b846f0aa103955376ae369ed9acc41d80ab995afca57c61cc6b9f33168
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9518e74794986289260782bf556fd782896c138c0de0ca4d90aec3c35bb3496fee6887e0230055c80d891d8f532dec097c46418d45da284d3356cdc3fa8352ee
|
7
|
+
data.tar.gz: fa7b09a43ac1556883ddbff8780bf0e570a46d342189cd6713d749c1c1aad10ee2b880c160de72f703646054b122f60c12d8cbe1583e050a198f96ec01924fd6
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/line-tree.rb
CHANGED
@@ -204,17 +204,31 @@ class LineTree
|
|
204
204
|
|
205
205
|
def scan_a(a)
|
206
206
|
|
207
|
-
puts 'a: ' + a.inspect if @debug
|
207
|
+
puts 'a: ' + a.inspect if @debug
|
208
208
|
|
209
209
|
a.each do |node|
|
210
|
-
|
211
|
-
scan_a node[1..-1] if node[1..-1].is_a? Array
|
212
210
|
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
211
|
+
puts 'node: ' + node.inspect if @debug
|
212
|
+
|
213
|
+
if node.is_a? Array then
|
214
|
+
if node[1].is_a?(Array) and node[1][0] =~ /^<\w+/ then
|
215
|
+
|
216
|
+
r = parse_node(node[0])
|
217
|
+
node[0] = r[0]
|
218
|
+
node[2] = node[1][0]
|
219
|
+
node[1] = r[1]
|
217
220
|
|
221
|
+
else
|
222
|
+
|
223
|
+
scan_a node[1..-1] if node[1..-1].is_a?(Array)
|
224
|
+
|
225
|
+
puts 'node2: ' + node.inspect if @debug
|
226
|
+
|
227
|
+
r = parse_node(node[0])
|
228
|
+
node[0] = r[0]; node.insert 1, r[1], r[2]
|
229
|
+
|
230
|
+
end
|
231
|
+
end
|
218
232
|
end
|
219
233
|
|
220
234
|
if a.first.is_a? String then
|
@@ -226,8 +240,8 @@ class LineTree
|
|
226
240
|
return [nil,non_element] if non_element
|
227
241
|
end
|
228
242
|
|
229
|
-
|
230
|
-
|
243
|
+
r = parse_node(s)
|
244
|
+
a[0] = r[0]; a.insert 1, r[1], r[2]
|
231
245
|
end
|
232
246
|
|
233
247
|
a
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: line-tree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
tRbkGzcgp9c2ZiHYMTUE+pFTjJmsHsHNK2V5UKCUGoiLja2dhcA5APnBhy1IGSao
|
36
36
|
guQOgw0RA86t3d5G4VaV1iMO
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2019-
|
38
|
+
date: 2019-07-14 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: rexle
|
@@ -46,7 +46,7 @@ dependencies:
|
|
46
46
|
version: '1.5'
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 1.5.
|
49
|
+
version: 1.5.2
|
50
50
|
type: :runtime
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -56,7 +56,7 @@ dependencies:
|
|
56
56
|
version: '1.5'
|
57
57
|
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version: 1.5.
|
59
|
+
version: 1.5.2
|
60
60
|
description: Line-tree parses indented lines of text and returns an array representing
|
61
61
|
a tree structure.
|
62
62
|
email: james@jamesrobertson.eu
|
metadata.gz.sig
CHANGED
Binary file
|