govspeak 1.5.3 → 1.5.4

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.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.5.4
2
+
3
+ * Stop steps list regex matching newline.
4
+
1
5
  ## 1.5.3
2
6
 
3
7
  * Nested Govspeak blocks are now parsed recursively using Govspeak. Among other
data/lib/govspeak.rb CHANGED
@@ -159,7 +159,7 @@ module Govspeak
159
159
  %{<div class="address"><div class="adr org fn"><p>\n#{body.sub("\n", "").gsub("\n", "<br />")}\n</p></div></div>\n}
160
160
  }
161
161
 
162
- extension("numbered list", /^\s*((s\d+\.\s.*(?:\n|$))+)/) do |body|
162
+ extension("numbered list", /^[ \t]*((s\d+\.\s.*(?:\n|$))+)/) do |body|
163
163
  steps ||= 0
164
164
  body.gsub!(/s(\d+)\.\s(.*)(?:\n|$)/) do |b|
165
165
  "<li>#{Govspeak::Document.new($2.strip).to_html}</li>\n"
@@ -1,3 +1,3 @@
1
1
  module Govspeak
2
- VERSION = "1.5.3"
2
+ VERSION = "1.5.4"
3
3
  end
@@ -374,6 +374,28 @@ $CTA
374
374
  assert_text_output "zippy bungle george"
375
375
  end
376
376
 
377
+ test_given_govspeak "
378
+ - unordered
379
+ - list
380
+
381
+ s1. step
382
+ s2. list
383
+ " do
384
+ assert_html_output %{
385
+ <ul>
386
+ <li>unordered</li>
387
+ <li>list</li>
388
+ </ul>
389
+
390
+ <ol class="steps">
391
+ <li><p>step</p>
392
+ </li>
393
+ <li><p>list</p>
394
+ </li>
395
+ </ol>}
396
+ assert_text_output "unordered list step list"
397
+ end
398
+
377
399
  test_given_govspeak "
378
400
  Zippy, Bungle and George did not qualify for the tax exemption in s428. They filled in their tax return accordingly.
379
401
  " do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govspeak
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.3
4
+ version: 1.5.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-06-09 00:00:00.000000000 Z
13
+ date: 2014-06-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: kramdown
@@ -181,7 +181,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
181
181
  version: '0'
182
182
  segments:
183
183
  - 0
184
- hash: 3341378448441504199
184
+ hash: 17277922338174539
185
185
  required_rubygems_version: !ruby/object:Gem::Requirement
186
186
  none: false
187
187
  requirements:
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
190
  version: '0'
191
191
  segments:
192
192
  - 0
193
- hash: 3341378448441504199
193
+ hash: 17277922338174539
194
194
  requirements: []
195
195
  rubyforge_project:
196
196
  rubygems_version: 1.8.23