govspeak 1.5.3 → 1.5.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/lib/govspeak.rb +1 -1
- data/lib/govspeak/version.rb +1 -1
- data/test/govspeak_test.rb +22 -0
- metadata +4 -4
data/CHANGELOG.md
CHANGED
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",
|
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"
|
data/lib/govspeak/version.rb
CHANGED
data/test/govspeak_test.rb
CHANGED
@@ -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.
|
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-
|
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:
|
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:
|
193
|
+
hash: 17277922338174539
|
194
194
|
requirements: []
|
195
195
|
rubyforge_project:
|
196
196
|
rubygems_version: 1.8.23
|