slaw 1.0.1 → 1.0.2

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: 2dd8363ae73cad0079b72a8a6c38b505ed3b1395
4
- data.tar.gz: 4d253ba9b348f21d75fb70ae9ce9f2089986ad00
3
+ metadata.gz: 144db68aa0eec37d77e0550a1f5b3d572513d1f7
4
+ data.tar.gz: 4b0600effc6afa94eb5fbbdeb557c76c0ecf63da
5
5
  SHA512:
6
- metadata.gz: ccd88de259305bc8bf180be5d32716d0e702e036ff7e7e5f481c06b8676d53ed5c0c65839d7da99c3720e2737eae31560dbb38ddd126fb2bc0f400b3f2316f92
7
- data.tar.gz: 17a4ad4e338b9f67375e656b737236ee1f95a5ca64b3f8a54fe0b61942262d4c4c63eb08aafc3008146318ba9fce5538b9a58ec8c2b21afa6407a66a285dbbfe
6
+ metadata.gz: c6edaf2914c46fae7a1c2b70178779937a0852dff1c4d28633011d79b71089cdaa830c8c10c2f8e47724c2b275b8672081fd4fbf3dd5b2649db795243ae377ce
7
+ data.tar.gz: 1af8dd3c707f60cbf43c4b2667cf19e55b2cd38e9c5ec9502e593e4f0110e80f59900fa7c58b74f2f9777f7a977721ec06ad89ce8eb0eacaec5480dd02061e61
@@ -209,7 +209,7 @@ module Slaw
209
209
  # of the number to catch this case.
210
210
  num:('(' number_letter ')')
211
211
  /
212
- num:dotted_number_2 '.'? space
212
+ num:dotted_number_2 '.'? (space / newline)
213
213
  end
214
214
 
215
215
  include Slaw::Grammars::Inlines
data/lib/slaw/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Slaw
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -1337,6 +1337,36 @@ EOS
1337
1337
  <p>3. a third</p>
1338
1338
  </content>
1339
1339
  </paragraph>
1340
+ </section>'
1341
+ end
1342
+
1343
+ it 'should not clash with dotted subsections' do
1344
+ node = parse :section, <<EOS
1345
+ 3. Types of informal trading
1346
+ 3.1
1347
+ Informal trading may include, amongst others:-
1348
+ 3.1.1 street trading;
1349
+ 3.1.2 trading in pedestrian malls;
1350
+ EOS
1351
+ to_xml(node, '').should == '<section id="section-3">
1352
+ <num>3.</num>
1353
+ <heading>Types of informal trading</heading>
1354
+ <subsection id="section-3.3.1">
1355
+ <num>3.1</num>
1356
+ <content>
1357
+ <p>Informal trading may include, amongst others:-</p>
1358
+ <blockList id="section-3.3.1.list1">
1359
+ <item id="section-3.3.1.list1.3.1.1">
1360
+ <num>3.1.1</num>
1361
+ <p>street trading;</p>
1362
+ </item>
1363
+ <item id="section-3.3.1.list1.3.1.2">
1364
+ <num>3.1.2</num>
1365
+ <p>trading in pedestrian malls;</p>
1366
+ </item>
1367
+ </blockList>
1368
+ </content>
1369
+ </subsection>
1340
1370
  </section>'
1341
1371
  end
1342
1372
  end
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: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Kempe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-22 00:00:00.000000000 Z
11
+ date: 2018-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler