line-tree 0.4.2 → 0.4.3
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/lib/line-tree.rb +7 -15
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c01443853dcb5372988684e8fb1d566eecc1214d
|
4
|
+
data.tar.gz: 3867f0dac52376ee8ecdea47599125e9cb7a99f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a8c21bf472453012824922035047a9f115ad85f2fa35c3e83d22b93081db7f36d664f292a9918dabb3e15b29846c7698b77f103484595fe4accca763830432e
|
7
|
+
data.tar.gz: 2bd4441e5711798eeb5c9a4fc93b2c2ee121035c2098bb6c4cff3d59e33290ef3a8012ab5cbc79aa141b2b4aaece473ff60c90428349504849f067e57e1c3633
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/line-tree.rb
CHANGED
@@ -30,27 +30,19 @@ class LineTree
|
|
30
30
|
a.map do |x|
|
31
31
|
|
32
32
|
unless x[/.*/][/^\s*\w+:\S+/] then
|
33
|
+
|
33
34
|
rlines = x.split(/\n/)
|
35
|
+
rlines = [x] if level and level < 0
|
36
|
+
|
34
37
|
label = [rlines.shift]
|
35
38
|
new_lines = rlines.map{|x| x[2..-1]}
|
36
39
|
|
37
40
|
if new_lines.length > 1 then
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
if level < 1 then
|
42
|
-
|
43
|
-
[(label + new_lines).join("\n")]
|
44
|
-
else
|
45
|
-
label + scan_shift(new_lines.join("\n"),level)
|
46
|
-
end
|
47
|
-
else
|
48
|
-
label + scan_shift(new_lines.join("\n"),level)
|
49
|
-
end
|
50
|
-
|
51
|
-
else
|
52
|
-
new_lines.length > 0 ? label + [new_lines] : label
|
41
|
+
label + scan_shift(new_lines.join("\n"),level)
|
42
|
+
else
|
43
|
+
new_lines.length > 0 ? label + [new_lines] : label
|
53
44
|
end
|
45
|
+
|
54
46
|
else
|
55
47
|
[x.lines.map{|x| x.sub(/^\s{2}/,'')}.join]
|
56
48
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
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.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
ErtlSTAImlBCK8q5BS4jBBt8VAEpNdkWpWbtDtLPA639pW2QWIcPx13ObWJh7Ejk
|
32
32
|
THoVqqsHTfeg3g==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2014-12-
|
34
|
+
date: 2014-12-21 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rexle
|
metadata.gz.sig
CHANGED
Binary file
|