line-tree 0.6.9 → 0.6.10
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
- checksums.yaml.gz.sig +0 -0
- data/lib/line-tree.rb +12 -2
- 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: 25436780a74abfac424368c294511db95fa7ead4
|
4
|
+
data.tar.gz: 644d89987c9d42c2aab7a311ad0d64868cf41276
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6ab31cd642e5a6f733dc92894093850b04436b6c61f51a73b11618cfa9a8468e81efa8009f6332fd4bfa5e7663d93119c12b8734c5a28d9bc59e97b13666dcb
|
7
|
+
data.tar.gz: 26669d6b28374c0be86af4d2ef46cc1c90b09c05813f93caaf5d4be39d237d5b82c1ae3af14657ad0b7ec6d6aaad2cddd38a8814018a3fafc4773114b0a31a11
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/line-tree.rb
CHANGED
@@ -23,7 +23,7 @@ class LineTree
|
|
23
23
|
@debug = debug
|
24
24
|
|
25
25
|
lines = ignore_blank_lines ? s.gsub(/^ *$\n/,'') : s
|
26
|
-
|
26
|
+
puts 'lines : ' + lines.inspect if @debug
|
27
27
|
@to_a = scan_shift(lines.strip, level)
|
28
28
|
|
29
29
|
end
|
@@ -89,6 +89,8 @@ class LineTree
|
|
89
89
|
|
90
90
|
a.map do |x|
|
91
91
|
|
92
|
+
puts 'x: ' + x.inspect if @debug
|
93
|
+
|
92
94
|
x.sub!(/ *$/,'')
|
93
95
|
|
94
96
|
if @ignore_label == true or not x[/.*/][/^ *\w+:\S+/] then
|
@@ -125,7 +127,15 @@ class LineTree
|
|
125
127
|
end
|
126
128
|
|
127
129
|
else
|
128
|
-
|
130
|
+
|
131
|
+
puts 'chomp' if @debug
|
132
|
+
puts 'level: ' + level.inspect if @debug
|
133
|
+
|
134
|
+
if level and level < 1 then
|
135
|
+
[x]
|
136
|
+
else
|
137
|
+
[x.lines.map{|x| x.sub(/^ {2}/,'').chomp }.join]
|
138
|
+
end
|
129
139
|
end
|
130
140
|
end
|
131
141
|
|
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.6.
|
4
|
+
version: 0.6.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
wN+2fv6EC2h0XIvfmiFpfz1F3AiA5cWUW8HuIO87gQy/9YbBrh4VK9WSnVaVEv0u
|
31
31
|
6gM=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2018-
|
33
|
+
date: 2018-08-01 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: rexle
|
metadata.gz.sig
CHANGED
Binary file
|