govspeak 6.5.10 → 6.5.11

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
  SHA256:
3
- metadata.gz: 3e54143d6d1df165694cae9c5ffeef35267bf25fb91d999e9e8b46dd0b76877f
4
- data.tar.gz: a01f9c44fec457bc296fd217c51b4e4b332728895c0ade749b26190ff74528c0
3
+ metadata.gz: a45a14e5a726d918753171dc957cc1ed29e50d4505685ff19271da6cad41945d
4
+ data.tar.gz: 27d874bc05f80a2c37edae5010a326b426cbcf1663d5bfcc1bedc9d6852e1e02
5
5
  SHA512:
6
- metadata.gz: 42dbc03399dde648c4a89f2237ba0e7320d066d20cd8ce8d0b05caee2ef5bb69af7cbfc1aebe60a1577a04fc8fc63769fe5f4b284232fea317f45775599694bd
7
- data.tar.gz: b96148ecb4e143bab160517d4c997782a946f3ba75a8ce045ad2ce0893a578aa8d83df275e7239d0bb0a335bf3486e386d0c901a29328eddd26fd39b7c6b9e7c
6
+ metadata.gz: 5a01955112fab442c130f71c93e4c2a743c1c9d7a16797d5a2ef406bc7ad591f8380b90f03574d373cf8a519d40e4828b880a9a45d1e36b8c5128f423ac1e20f
7
+ data.tar.gz: 7ae23223d912b5753eefc4568190fd74e36968a6697e6ef5eeefeff65d88d63f0ec763122b716a4a6179b1c188121c349bb8f9fb6c74ccd346906084cdf7e184
@@ -1,3 +1,7 @@
1
+ ## 6.5.11
2
+
3
+ * Fix issue rendering $CTA blocks before $C (PR#202)
4
+
1
5
  ## 6.5.10
2
6
 
3
7
  * Be optimistic in versions of govuk_publishing_components and i18n allowed (PR#200)
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%*
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module Govspeak
2
- VERSION = "6.5.10".freeze
2
+ VERSION = "6.5.11".freeze
3
3
  end
@@ -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.10
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-10 00:00:00.000000000 Z
11
+ date: 2020-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview