slaw 3.3.0 → 3.3.1
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/grammars/za/act.treetop +2 -2
- data/lib/slaw/version.rb +1 -1
- data/spec/za/act_block_spec.rb +126 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2471751fab79dd5f9c4694d288db979b3b2d4588ee42a0b5acfa8c03f72a4886
|
4
|
+
data.tar.gz: fdf2d1217666aececa82396becf26d7d110eccdecf20731a2a5bff7c9a871df3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8057de3424875aa508a913d3b6ff90c35cf0131b9270f18f8748a639f7027c2f59c1c57fef87eafbbbd5bf9b9fb1133501330d251f1957344eff59d800c946e0
|
7
|
+
data.tar.gz: 90e06d7ef470a0b8fc3359fb77e9669e58b6ca291bb3589d6f2cb222f70acab5cf1681ad99a927490297aed65f4cf0840f1f1968fc538855154841cf9f2f3a37
|
data/README.md
CHANGED
@@ -81,6 +81,10 @@ You can create your own grammar by creating a gem that provides these files and
|
|
81
81
|
|
82
82
|
## Changelog
|
83
83
|
|
84
|
+
### 3.3.1 (15 May 2019)
|
85
|
+
|
86
|
+
* Crossheadings at start of body (ending preface and preamble)
|
87
|
+
|
84
88
|
### 3.3.0 (1 May 2019)
|
85
89
|
|
86
90
|
* Only renest annotated blocklists
|
@@ -183,13 +183,13 @@ module Slaw
|
|
183
183
|
end
|
184
184
|
|
185
185
|
rule preface_statement
|
186
|
-
space? !(chapter_heading / part_heading / section_title / schedule_title)
|
186
|
+
space? !(chapter_heading / part_heading / section_title / schedule_title / crossheading)
|
187
187
|
content:(longtitle / ('\\'? inline_items:inline_items eol))
|
188
188
|
<PrefaceStatement>
|
189
189
|
end
|
190
190
|
|
191
191
|
rule preamble_statement
|
192
|
-
space? !(chapter_heading / part_heading / section_title / schedule_title) '\\'? inline_items eol
|
192
|
+
space? !(chapter_heading / part_heading / section_title / schedule_title / crossheading) '\\'? inline_items eol
|
193
193
|
<NakedStatement>
|
194
194
|
end
|
195
195
|
|
data/lib/slaw/version.rb
CHANGED
data/spec/za/act_block_spec.rb
CHANGED
@@ -2140,6 +2140,132 @@ EOS
|
|
2140
2140
|
<heading>something <remark status="editorial">[remark]</remark> <ref href="/foo/bar">link</ref></heading>
|
2141
2141
|
</hcontainer>'
|
2142
2142
|
end
|
2143
|
+
|
2144
|
+
it 'should not be allowed in preface' do
|
2145
|
+
node = parse :act, '
|
2146
|
+
PREFACE
|
2147
|
+
|
2148
|
+
Some text
|
2149
|
+
|
2150
|
+
CROSSHEADING In the body
|
2151
|
+
|
2152
|
+
1. Section 1
|
2153
|
+
|
2154
|
+
Text
|
2155
|
+
'
|
2156
|
+
today = Time.now.strftime('%Y-%m-%d')
|
2157
|
+
to_xml(node, "").should == '<act contains="originalVersion">
|
2158
|
+
<meta>
|
2159
|
+
<identification source="#slaw">
|
2160
|
+
<FRBRWork>
|
2161
|
+
<FRBRthis value="/za/act/1980/01/main"/>
|
2162
|
+
<FRBRuri value="/za/act/1980/01"/>
|
2163
|
+
<FRBRalias value="Short Title"/>
|
2164
|
+
<FRBRdate date="1980-01-01" name="Generation"/>
|
2165
|
+
<FRBRauthor href="#council"/>
|
2166
|
+
<FRBRcountry value="za"/>
|
2167
|
+
</FRBRWork>
|
2168
|
+
<FRBRExpression>
|
2169
|
+
<FRBRthis value="/za/act/1980/01/eng@/main"/>
|
2170
|
+
<FRBRuri value="/za/act/1980/01/eng@"/>
|
2171
|
+
<FRBRdate date="1980-01-01" name="Generation"/>
|
2172
|
+
<FRBRauthor href="#council"/>
|
2173
|
+
<FRBRlanguage language="eng"/>
|
2174
|
+
</FRBRExpression>
|
2175
|
+
<FRBRManifestation>
|
2176
|
+
<FRBRthis value="/za/act/1980/01/eng@/main"/>
|
2177
|
+
<FRBRuri value="/za/act/1980/01/eng@"/>
|
2178
|
+
<FRBRdate date="' + today + '" name="Generation"/>
|
2179
|
+
<FRBRauthor href="#slaw"/>
|
2180
|
+
</FRBRManifestation>
|
2181
|
+
</identification>
|
2182
|
+
<references source="#this">
|
2183
|
+
<TLCOrganization id="slaw" href="https://github.com/longhotsummer/slaw" showAs="Slaw"/>
|
2184
|
+
<TLCOrganization id="council" href="/ontology/organization/za/council" showAs="Council"/>
|
2185
|
+
</references>
|
2186
|
+
</meta>
|
2187
|
+
<preface>
|
2188
|
+
<p>Some text</p>
|
2189
|
+
</preface>
|
2190
|
+
<body>
|
2191
|
+
<hcontainer id="crossheading-0" name="crossheading">
|
2192
|
+
<heading>In the body</heading>
|
2193
|
+
</hcontainer>
|
2194
|
+
<section id="section-1">
|
2195
|
+
<num>1.</num>
|
2196
|
+
<heading>Section 1</heading>
|
2197
|
+
<paragraph id="section-1.paragraph0">
|
2198
|
+
<content>
|
2199
|
+
<p>Text</p>
|
2200
|
+
</content>
|
2201
|
+
</paragraph>
|
2202
|
+
</section>
|
2203
|
+
</body>
|
2204
|
+
</act>'
|
2205
|
+
end
|
2206
|
+
|
2207
|
+
it 'should not be allowed in preamble' do
|
2208
|
+
node = parse :act, '
|
2209
|
+
PREAMBLE
|
2210
|
+
|
2211
|
+
Some text
|
2212
|
+
|
2213
|
+
CROSSHEADING In the body
|
2214
|
+
|
2215
|
+
1. Section 1
|
2216
|
+
|
2217
|
+
Text
|
2218
|
+
'
|
2219
|
+
today = Time.now.strftime('%Y-%m-%d')
|
2220
|
+
to_xml(node, "").should == '<act contains="originalVersion">
|
2221
|
+
<meta>
|
2222
|
+
<identification source="#slaw">
|
2223
|
+
<FRBRWork>
|
2224
|
+
<FRBRthis value="/za/act/1980/01/main"/>
|
2225
|
+
<FRBRuri value="/za/act/1980/01"/>
|
2226
|
+
<FRBRalias value="Short Title"/>
|
2227
|
+
<FRBRdate date="1980-01-01" name="Generation"/>
|
2228
|
+
<FRBRauthor href="#council"/>
|
2229
|
+
<FRBRcountry value="za"/>
|
2230
|
+
</FRBRWork>
|
2231
|
+
<FRBRExpression>
|
2232
|
+
<FRBRthis value="/za/act/1980/01/eng@/main"/>
|
2233
|
+
<FRBRuri value="/za/act/1980/01/eng@"/>
|
2234
|
+
<FRBRdate date="1980-01-01" name="Generation"/>
|
2235
|
+
<FRBRauthor href="#council"/>
|
2236
|
+
<FRBRlanguage language="eng"/>
|
2237
|
+
</FRBRExpression>
|
2238
|
+
<FRBRManifestation>
|
2239
|
+
<FRBRthis value="/za/act/1980/01/eng@/main"/>
|
2240
|
+
<FRBRuri value="/za/act/1980/01/eng@"/>
|
2241
|
+
<FRBRdate date="' + today + '" name="Generation"/>
|
2242
|
+
<FRBRauthor href="#slaw"/>
|
2243
|
+
</FRBRManifestation>
|
2244
|
+
</identification>
|
2245
|
+
<references source="#this">
|
2246
|
+
<TLCOrganization id="slaw" href="https://github.com/longhotsummer/slaw" showAs="Slaw"/>
|
2247
|
+
<TLCOrganization id="council" href="/ontology/organization/za/council" showAs="Council"/>
|
2248
|
+
</references>
|
2249
|
+
</meta>
|
2250
|
+
<preamble>
|
2251
|
+
<p>Some text</p>
|
2252
|
+
</preamble>
|
2253
|
+
<body>
|
2254
|
+
<hcontainer id="crossheading-0" name="crossheading">
|
2255
|
+
<heading>In the body</heading>
|
2256
|
+
</hcontainer>
|
2257
|
+
<section id="section-1">
|
2258
|
+
<num>1.</num>
|
2259
|
+
<heading>Section 1</heading>
|
2260
|
+
<paragraph id="section-1.paragraph0">
|
2261
|
+
<content>
|
2262
|
+
<p>Text</p>
|
2263
|
+
</content>
|
2264
|
+
</paragraph>
|
2265
|
+
</section>
|
2266
|
+
</body>
|
2267
|
+
</act>'
|
2268
|
+
end
|
2143
2269
|
end
|
2144
2270
|
|
2145
2271
|
#-------------------------------------------------------------------------------
|
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: 3.3.
|
4
|
+
version: 3.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Kempe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05-
|
11
|
+
date: 2019-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|