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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea737a9f991dc77e43d90b57bbcaa4af837b7aa0
4
- data.tar.gz: fd4f5f6aeec7084f69f8202b489fac88e6a6eacd
3
+ metadata.gz: 25436780a74abfac424368c294511db95fa7ead4
4
+ data.tar.gz: 644d89987c9d42c2aab7a311ad0d64868cf41276
5
5
  SHA512:
6
- metadata.gz: bedd37f3f9ed668d0d96a2ee304ab9c2d39970e60b5bcbd9831cc624b8b72bb74007e1df7e905740a6b7f7eb83edab88a2884ecf309cfb10177ab53203b1162f
7
- data.tar.gz: 3b88b94107aadc37aef3884fb8e737a654f45067aaaa81529f6bbb49c9a28149cc52bbd291ecd08fb9cf3f5bc29d77361ed1293968d2cd8a60d4c07af827fb5e
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
- [x.lines.map{|x| x.sub(/^ {2}/,'').chomp }.join]
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.9
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-07-02 00:00:00.000000000 Z
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