slaw 0.8.2 → 0.8.3
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
- data/README.md +4 -0
- data/lib/slaw/parse/cleanser.rb +2 -2
- data/lib/slaw/version.rb +1 -1
- data/spec/parse/cleanser_spec.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86252d91f002c7d21cc40838a6656943a705358a
|
4
|
+
data.tar.gz: c1f63cc236fc5dce297ffd3e08bbf2ea9eb4482c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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)
|
data/lib/slaw/parse/cleanser.rb
CHANGED
@@ -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+\.
|
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+\.
|
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
data/spec/parse/cleanser_spec.rb
CHANGED
@@ -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.
|
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:
|
11
|
+
date: 2016-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|