slaw 0.8.2 → 0.8.3

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: ebc9c571ef0b0a1ef1bff4a209bac844df2d22a3
4
- data.tar.gz: 6052a4641c800a8510ec02aeddc6653cb482a349
3
+ metadata.gz: 86252d91f002c7d21cc40838a6656943a705358a
4
+ data.tar.gz: c1f63cc236fc5dce297ffd3e08bbf2ea9eb4482c
5
5
  SHA512:
6
- metadata.gz: d57425bab077cc85397b0c05bd2f68d187e64278f4758006d9679aa00ef002a519071a960e3703b1bd608b2ab4bccac544e3d7254869ea7f47840d4420e066d0
7
- data.tar.gz: fe7372c0aee508e481d5c2665747030a1b26e11d00e912311424d79c6cf30438db81dbe4577ab14aae6efb99aaa8f33dc30d605c1691a9c48b632354c63d0817
6
+ metadata.gz: e0191f62145209f2d0506366011519fe634cd27d8a0bbb1e62fe3415ea7a4967ed9f5a84960305546834622051bcc97674e10261e71b5da57b88b73bb2b4c163
7
+ data.tar.gz: fe67681172b29cc3ec971276cfb1124984f27999f80af064665c0cd402e03c4b941da9ec2e85745be453f751057038068db2f627c2392e09b7b07a9671cf2c8a
data/README.md CHANGED
@@ -216,6 +216,10 @@ Akoma Ntoso `component` elements at the end of the XML document, with a name of
216
216
 
217
217
  ## Changelog
218
218
 
219
+ ### 0.8.3
220
+
221
+ * During cleanup, break lines on section titles that don't have a space after the number, eg: "New section title 4.(1) The content..."
222
+
219
223
  ### 0.8.2
220
224
 
221
225
  * Schedules can be empty (#10)
@@ -103,10 +103,10 @@ module Slaw
103
103
  # often we find a section title munged onto the same line as its first statement
104
104
  # eg:
105
105
  # foo bar. New section title 62. (1) For the purpose
106
- s = s.gsub(/\. ([^.]+) (\d+\. \(1\) )/, ".\n" + '\1' + "\n" + '\2')
106
+ s = s.gsub(/\. ([^.]+) (\d+\. ?\(1\) )/, ".\n" + '\1' + "\n" + '\2')
107
107
 
108
108
  # New section title 62. (1) For the purpose
109
- s = s.gsub(/(\w) (\d+\. \(1\) )/, '\1' + "\n" + '\2')
109
+ s = s.gsub(/(\w) (\d+\. ?\(1\) )/, '\1' + "\n" + '\2')
110
110
 
111
111
  # (1) foo; (2) bar
112
112
  # (1) foo. (2) bar
data/lib/slaw/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Slaw
2
- VERSION = "0.8.2"
2
+ VERSION = "0.8.3"
3
3
  end
@@ -55,7 +55,9 @@ permit; and
55
55
 
56
56
  it 'should break lines at likely section titles' do
57
57
  subject.break_lines('foo bar. New section title 62. (1) For the purpose').should == "foo bar.\nNew section title\n62. (1) For the purpose"
58
+ subject.break_lines('foo bar. New section title 62.(1) For the purpose').should == "foo bar.\nNew section title\n62.(1) For the purpose"
58
59
  subject.break_lines('New section title 62. (1) For the purpose').should == "New section title\n62. (1) For the purpose"
60
+ subject.break_lines('New section title 62.(1) For the purpose').should == "New section title\n62.(1) For the purpose"
59
61
  end
60
62
 
61
63
  it 'should clean up wrapped definition lines after pdf' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slaw
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Kempe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-07 00:00:00.000000000 Z
11
+ date: 2016-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler