slaw 3.3.1 → 3.3.2

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
  SHA256:
3
- metadata.gz: 2471751fab79dd5f9c4694d288db979b3b2d4588ee42a0b5acfa8c03f72a4886
4
- data.tar.gz: fdf2d1217666aececa82396becf26d7d110eccdecf20731a2a5bff7c9a871df3
3
+ metadata.gz: f8ee67f5faf27fbf0798c473d13ed04fdb23f50e84fd5da699688e91a9243c81
4
+ data.tar.gz: fa1e18df9ddece8b4e81604a9697e711b846fae2dfac465ddce7efdedb3e6e7a
5
5
  SHA512:
6
- metadata.gz: 8057de3424875aa508a913d3b6ff90c35cf0131b9270f18f8748a639f7027c2f59c1c57fef87eafbbbd5bf9b9fb1133501330d251f1957344eff59d800c946e0
7
- data.tar.gz: 90e06d7ef470a0b8fc3359fb77e9669e58b6ca291bb3589d6f2cb222f70acab5cf1681ad99a927490297aed65f4cf0840f1f1968fc538855154841cf9f2f3a37
6
+ metadata.gz: 71e49ed835dad5c8d8e1663ec1df605c41bf43fb9e6691d41854be88f60923da7b425522c527bd154cc200b5c42bbf0f7db8bf3e46593f334b4c7ec209cb5d7a
7
+ data.tar.gz: 1a55315fa951c9208438ecea2718da71e9e2ab70bf23adbc16bb7d910855a6b8e9bad56e74f0d43474e56ad542f1f9d1124d84f4695f1f8d7c2bb11fbe81ef5e
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.2 (15 May 2019)
85
+
86
+ * Internal adjustments to make rules easier to override
87
+
84
88
  ### 3.3.1 (15 May 2019)
85
89
 
86
90
  * Crossheadings at start of body (ending preface and preamble)
@@ -178,18 +178,18 @@ module Slaw
178
178
  # and is ignored. This allows escaping of section headings, etc.
179
179
 
180
180
  rule naked_statement
181
- space? !(chapter_heading / part_heading / section_title / schedule_title / subsection_prefix / crossheading) '\\'? inline_items:inline_items? eol
181
+ space? !body_hierarchy_prefix '\\'? inline_items:inline_items? eol
182
182
  <NakedStatement>
183
183
  end
184
184
 
185
185
  rule preface_statement
186
- space? !(chapter_heading / part_heading / section_title / schedule_title / crossheading)
186
+ space? !non_body_hierarchy_prefix
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 / crossheading) '\\'? inline_items eol
192
+ space? !non_body_hierarchy_prefix '\\'? inline_items eol
193
193
  <NakedStatement>
194
194
  end
195
195
 
@@ -237,6 +237,16 @@ module Slaw
237
237
  num:dotted_number_2 '.'? (space / newline)
238
238
  end
239
239
 
240
+ rule body_hierarchy_prefix
241
+ # Text that indicates the start of a hierarchy element, in the body
242
+ chapter_heading / part_heading / section_title / schedule_title / subsection_prefix / crossheading
243
+ end
244
+
245
+ rule non_body_hierarchy_prefix
246
+ # Text that indicates the start of a hierarchy element, in the preamble or preface
247
+ chapter_heading / part_heading / section_title / schedule_title / crossheading
248
+ end
249
+
240
250
  include Slaw::Grammars::Inlines
241
251
  include Slaw::Grammars::Tables
242
252
  include Slaw::Grammars::Schedules
data/lib/slaw/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Slaw
2
- VERSION = "3.3.1"
2
+ VERSION = "3.3.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slaw
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.1
4
+ version: 3.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Kempe