line-tree 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c01443853dcb5372988684e8fb1d566eecc1214d
4
- data.tar.gz: 3867f0dac52376ee8ecdea47599125e9cb7a99f1
3
+ metadata.gz: 636d76784f401cbc4bd98ff9d08dc572c9cbf979
4
+ data.tar.gz: 1ccbf7d4e2529bc46ff5b39c77eb88aff7ecac8d
5
5
  SHA512:
6
- metadata.gz: 2a8c21bf472453012824922035047a9f115ad85f2fa35c3e83d22b93081db7f36d664f292a9918dabb3e15b29846c7698b77f103484595fe4accca763830432e
7
- data.tar.gz: 2bd4441e5711798eeb5c9a4fc93b2c2ee121035c2098bb6c4cff3d59e33290ef3a8012ab5cbc79aa141b2b4aaece473ff60c90428349504849f067e57e1c3633
6
+ metadata.gz: f83bb9283f45bde6cdb45a107fb082b28ff3a5276d8a49c54aa632c0ffba3eeb65959e0e1bcf620f7e803295b312dac480d9b2edaf339415535c9ac45b29eb0c
7
+ data.tar.gz: ab4a9beb7cceadfeb636ccf87693ad40120f6498d525e85fdc80021d9443d584fbcfbd968887b8747b8cc8512637cb5854d3523f92190a407554a45b14bc8e00
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/line-tree.rb CHANGED
@@ -28,25 +28,25 @@ class LineTree
28
28
  a = lines.split(/(?=^\S+)/)
29
29
 
30
30
  a.map do |x|
31
-
31
+
32
32
  unless x[/.*/][/^\s*\w+:\S+/] then
33
33
 
34
- rlines = x.split(/\n/)
34
+ rlines = (x).split(/\n/,-1) #[0..-2]
35
35
  rlines = [x] if level and level < 0
36
-
37
36
  label = [rlines.shift]
38
37
  new_lines = rlines.map{|x| x[2..-1]}
39
38
 
40
39
  if new_lines.length > 1 then
41
40
  label + scan_shift(new_lines.join("\n"),level)
42
41
  else
43
- new_lines.length > 0 ? label + [new_lines] : label
42
+ (new_lines.length > 0 and new_lines != [nil])? label + [new_lines] : label
44
43
  end
45
44
 
46
45
  else
47
46
  [x.lines.map{|x| x.sub(/^\s{2}/,'')}.join]
48
47
  end
49
48
  end
49
+
50
50
 
51
51
  end
52
52
 
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.3
4
+ version: 0.4.4
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-21 00:00:00.000000000 Z
34
+ date: 2014-12-27 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rexle
metadata.gz.sig CHANGED
Binary file