govspeak 6.5.10 → 6.5.11
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/README.md +2 -2
- data/lib/govspeak.rb +4 -1
- data/lib/govspeak/version.rb +1 -1
- data/test/govspeak_test.rb +19 -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: a45a14e5a726d918753171dc957cc1ed29e50d4505685ff19271da6cad41945d
|
4
|
+
data.tar.gz: 27d874bc05f80a2c37edae5010a326b426cbcf1663d5bfcc1bedc9d6852e1e02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a01955112fab442c130f71c93e4c2a743c1c9d7a16797d5a2ef406bc7ad591f8380b90f03574d373cf8a519d40e4828b880a9a45d1e36b8c5128f423ac1e20f
|
7
|
+
data.tar.gz: 7ae23223d912b5753eefc4568190fd74e36968a6697e6ef5eeefeff65d88d63f0ec763122b716a4a6179b1c188121c349bb8f9fb6c74ccd346906084cdf7e184
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -65,7 +65,7 @@ creates an example box
|
|
65
65
|
|
66
66
|
## Highlights
|
67
67
|
|
68
|
-
### Advisory
|
68
|
+
### Advisory (DEPRECATED: marked for removal. Use 'Information callouts' instead.)
|
69
69
|
|
70
70
|
@This is a very important message or warning@
|
71
71
|
|
@@ -77,7 +77,7 @@ highlights the enclosed text in yellow
|
|
77
77
|
</h3>
|
78
78
|
```
|
79
79
|
|
80
|
-
### Answer
|
80
|
+
### Answer (DEPRECATED: marked for removal)
|
81
81
|
|
82
82
|
{::highlight-answer}
|
83
83
|
The VAT rate is *20%*
|
data/lib/govspeak.rb
CHANGED
@@ -272,6 +272,10 @@ module Govspeak
|
|
272
272
|
lines.join
|
273
273
|
end
|
274
274
|
|
275
|
+
# More specific tags must be defined first. Those defined earlier have a
|
276
|
+
# higher precedence for being matched. For example $CTA must be defined
|
277
|
+
# before $C otherwise the first ($C)TA fill be matched to a contact tag.
|
278
|
+
wrap_with_div("call-to-action", "$CTA", Govspeak::Document)
|
275
279
|
wrap_with_div("summary", "$!")
|
276
280
|
wrap_with_div("form-download", "$D")
|
277
281
|
wrap_with_div("contact", "$C")
|
@@ -279,7 +283,6 @@ module Govspeak
|
|
279
283
|
wrap_with_div("information", "$I", Govspeak::Document)
|
280
284
|
wrap_with_div("additional-information", "$AI")
|
281
285
|
wrap_with_div("example", "$E", Govspeak::Document)
|
282
|
-
wrap_with_div("call-to-action", "$CTA", Govspeak::Document)
|
283
286
|
|
284
287
|
extension("address", surrounded_by("$A")) do |body|
|
285
288
|
%(\n<div class="address"><div class="adr org fn"><p>\n#{body.sub("\n", '').gsub("\n", '<br />')}\n</p></div></div>\n)
|
data/lib/govspeak/version.rb
CHANGED
data/test/govspeak_test.rb
CHANGED
@@ -440,6 +440,25 @@ Teston
|
|
440
440
|
</div>)
|
441
441
|
end
|
442
442
|
|
443
|
+
test_given_govspeak "
|
444
|
+
$CTA
|
445
|
+
Click here to start the tool
|
446
|
+
$CTA
|
447
|
+
|
448
|
+
$C
|
449
|
+
Here is some text
|
450
|
+
$C
|
451
|
+
" do
|
452
|
+
assert_html_output %(
|
453
|
+
<div class="call-to-action">
|
454
|
+
<p>Click here to start the tool</p>
|
455
|
+
</div>
|
456
|
+
|
457
|
+
<div class="contact">
|
458
|
+
<p>Here is some text</p>
|
459
|
+
</div>)
|
460
|
+
end
|
461
|
+
|
443
462
|
test_given_govspeak "
|
444
463
|
[internal link](http://www.not-external.com)
|
445
464
|
|
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.5.
|
4
|
+
version: 6.5.11
|
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: 2020-
|
11
|
+
date: 2020-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|