govspeak 6.7.6 → 6.7.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/govspeak/version.rb +1 -1
- data/lib/govspeak.rb +1 -1
- data/test/govspeak_test.rb +54 -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: eeb616e6f8489b589e1ddda16e92727ec5c30a9ad76b88e89184aad8590276e3
|
4
|
+
data.tar.gz: cc776bc6208ca7baafce665f4c92a549f2ee6c70fa96652e81e2ed8a32a45f5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb08b6e651a21f26ae42efff15d74b80401b1dc26fd516b69b02394b9eeaa20825aa4e176ef789a35ae035bb5d8be13012fb42e35c88e1e487870c81c8c4d0af
|
7
|
+
data.tar.gz: 1dc3a85af8fb5ecacb8c9a530739e8f3742fa9ea79bd3830c73c2c5d36b907d737aec74e028a4df197f11e1c0bd7d55eb25e3f5d0009a22a930cfb4e0b449f50
|
data/CHANGELOG.md
CHANGED
data/lib/govspeak/version.rb
CHANGED
data/lib/govspeak.rb
CHANGED
@@ -322,7 +322,7 @@ module Govspeak
|
|
322
322
|
end
|
323
323
|
|
324
324
|
extension("call-to-action", surrounded_by("$CTA")) do |body|
|
325
|
-
doc = Kramdown::Document.new(body.strip).to_html
|
325
|
+
doc = Kramdown::Document.new(preprocess(body.strip), @options).to_html
|
326
326
|
doc = %(\n<div class="call-to-action">\n#{doc}</div>\n)
|
327
327
|
footnotes = body.scan(/\[\^(\d+)\]/).flatten
|
328
328
|
|
data/test/govspeak_test.rb
CHANGED
@@ -440,6 +440,60 @@ Teston
|
|
440
440
|
</div>)
|
441
441
|
end
|
442
442
|
|
443
|
+
test_given_govspeak "
|
444
|
+
$CTA
|
445
|
+
|
446
|
+
This is a test:
|
447
|
+
|
448
|
+
s1. This is number 1.
|
449
|
+
s2. This is number 2.
|
450
|
+
s3. This is number 3.
|
451
|
+
s4. This is number 4.
|
452
|
+
|
453
|
+
$CTA" do
|
454
|
+
assert_html_output %(
|
455
|
+
<div class="call-to-action">
|
456
|
+
<p>This is a test:</p>
|
457
|
+
|
458
|
+
<ol class="steps">
|
459
|
+
<li>
|
460
|
+
<p>This is number 1.</p>
|
461
|
+
</li>
|
462
|
+
<li>
|
463
|
+
<p>This is number 2.</p>
|
464
|
+
</li>
|
465
|
+
<li>
|
466
|
+
<p>This is number 3.</p>
|
467
|
+
</li>
|
468
|
+
<li>
|
469
|
+
<p>This is number 4.</p>
|
470
|
+
</li>
|
471
|
+
</ol>
|
472
|
+
</div>
|
473
|
+
)
|
474
|
+
end
|
475
|
+
|
476
|
+
test_given_govspeak "
|
477
|
+
$CTA
|
478
|
+
[external link](http://www.external.com) some text
|
479
|
+
$CTA
|
480
|
+
" do
|
481
|
+
assert_html_output %(
|
482
|
+
<div class="call-to-action">
|
483
|
+
<p><a rel="external" href="http://www.external.com">external link</a> some text</p>
|
484
|
+
</div>)
|
485
|
+
end
|
486
|
+
|
487
|
+
test_given_govspeak "
|
488
|
+
$CTA
|
489
|
+
[internal link](http://www.not-external.com) some text
|
490
|
+
$CTA", document_domains: %w[www.not-external.com] do
|
491
|
+
assert_html_output %(
|
492
|
+
<div class="call-to-action">
|
493
|
+
<p><a href="http://www.not-external.com">internal link</a> some text</p>
|
494
|
+
</div>)
|
495
|
+
end
|
496
|
+
|
443
497
|
test_given_govspeak "
|
444
498
|
$CTA
|
445
499
|
Click here to start the tool
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govspeak
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.7.
|
4
|
+
version: 6.7.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|