govspeak 6.7.0 → 6.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 14e93ed0928bdacce945ae5d1ea81d3bbc40508fcc1875c59e02297aed7f78e8
4
- data.tar.gz: b6f7f01034081da748db3d02e81fe31f72f155f2921de02b6d07f65d04587e09
3
+ metadata.gz: 3b07175e22a88ddf687631c2a157d00f9649efc118ab3e535d95cbda00918d43
4
+ data.tar.gz: 430f7d18852c8fdd549812c0260b118108292f34f2767902217c9d57a80d1f8b
5
5
  SHA512:
6
- metadata.gz: 00e6e768ecdc8ce782f849957370199bdbfde7a85973c83366590b09155395455f62be45e86bcf8864053070ecb3a9560645bef410e562121ef08acefe2bccac
7
- data.tar.gz: dd68a811064c4e63a092b00ffef191db7f3221308eb84cf916304b8e2207522baea4e37226c09527c4dc25f618b74b2604b39fc96ac986dfbb8008e93454f8fb
6
+ metadata.gz: 0fd6c1d0b6e8a416fdeb6d7aba99868dfb8e9ccf80191666dc771dcdf56a9bf396297569759c172608c31daf7bf75a891914e98713fc0e99b8458220b3dd7934
7
+ data.tar.gz: 8a04ab8364ea6ac989b4a1549ce8c4f152ad57988144183f7db00b5b256fce4b5823d79ac611a4078f75ccee5bd1d42f5a81344140979d2066916c2693a35dc4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## Unreleased
2
+
3
+ ## 6.7.1
4
+
5
+ * Update failing test [212](https://github.com/alphagov/govspeak/pull/212)
6
+ * Fix stats headline HTML semantics [213](https://github.com/alphagov/govspeak/pull/213)
7
+
1
8
  ## 6.7.0
2
9
 
3
10
  * Update heading & docs [#206](https://github.com/alphagov/govspeak/pull/206)
data/README.md CHANGED
@@ -18,6 +18,23 @@ then create a new document
18
18
  doc = Govspeak::Document.new "^Test^"
19
19
  puts doc.to_html
20
20
 
21
+ ## Changes appearing across GOV.UK
22
+
23
+ Some additional steps or considerations are needed to ensure changes to govspeak cascade across GOV.UK in a holistic way.
24
+
25
+ Once govspeak has been updated and version incremented then:
26
+ - [`govuk_publishing_components` govspeak](https://components.publishing.service.gov.uk/component-guide/govspeak) will also need updating to reflect your most recent change.
27
+ - [Publishing apps](https://docs.publishing.service.gov.uk/apps.html) (including but not limited to [content-publisher](https://github.com/alphagov/content-publisher) & [whitehall](https://github.com/alphagov/whitehall)) also use govspeak, these apps will need to be released with the new govspeak version present.
28
+
29
+ Also, consider if:
30
+ - [whitehall](https://github.com/alphagov/whitehall) needs updating (as custom govspeak changes are present)
31
+ - [govuk-content-schema](https://github.com/alphagov/govuk-content-schemas) needs updating
32
+ - [govpspeak-preview](https://github.com/alphagov/govspeak-preview) is worth updating
33
+
34
+ Any pages that use govspeak to generate Content will need to *republished* in order for the new changes to be reflected.
35
+
36
+ - Data Labs can help identify which pages need updating by [submitting a request](https://gov-uk.atlassian.net/wiki/spaces/GOVUK/pages/1860075525/GOV.UK+Data+Labs#Submitting-a-data-science-request) and [#govuk-2ndline](https://docs.publishing.service.gov.uk/manual/2nd-line.html) can help with republishing
37
+
21
38
  # Extensions
22
39
 
23
40
  In addition to the [standard Markdown syntax](http://daringfireball.net/projects/markdown/syntax "Markdown syntax"), we have added our own extensions.
@@ -106,9 +123,9 @@ Statistic headlines highlight important numbers in content. Displays a statistic
106
123
  Creates the following:
107
124
 
108
125
  ```html
109
- <aside class="stat-headline">
126
+ <div class="stat-headline">
110
127
  <p><em>13.8bn</em> years since the big bang</p>
111
- </aside>
128
+ </div>
112
129
  ```
113
130
 
114
131
  ## Points of Contact
@@ -676,4 +693,4 @@ which outputs
676
693
  Start Now
677
694
  <svg class="govuk-button__start-icon" xmlns="http://www.w3.org/2000/svg" width="17.5" height="19" viewBox="0 0 33 40" role="presentation" focusable="false"><path fill="currentColor" d="M0 0h13l20 20-20 20H0l20-20z"></path></svg>
678
695
  </a>
679
- ```
696
+ ```
data/lib/govspeak.rb CHANGED
@@ -185,8 +185,8 @@ module Govspeak
185
185
  end
186
186
 
187
187
  extension("stat-headline", %r${stat-headline}(.*?){/stat-headline}$m) do |body|
188
- %(\n\n<aside class="stat-headline">
189
- #{Govspeak::Document.new(body.strip).to_html}</aside>\n)
188
+ %(\n\n<div class="stat-headline">
189
+ #{Govspeak::Document.new(body.strip).to_html}</div>\n)
190
190
  end
191
191
 
192
192
  # FIXME: these surrounded_by arguments look dodgy
@@ -1,3 +1,3 @@
1
1
  module Govspeak
2
- VERSION = "6.7.0".freeze
2
+ VERSION = "6.7.1".freeze
3
3
  end
@@ -20,13 +20,13 @@ class GovspeakFootnoteTest < Minitest::Test
20
20
  [^3]: And then they both point here." do
21
21
  assert_html_output(
22
22
  %(
23
- <p>Footnotes can be added<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote">[footnote 1]</a></sup>.</p>
23
+ <p>Footnotes can be added<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">[footnote 1]</a></sup>.</p>
24
24
 
25
- <p>Footnotes can be added too<sup id="fnref:2" role="doc-noteref"><a href="#fn:2" class="footnote">[footnote 2]</a></sup>.</p>
25
+ <p>Footnotes can be added too<sup id="fnref:2" role="doc-noteref"><a href="#fn:2" class="footnote" rel="footnote">[footnote 2]</a></sup>.</p>
26
26
 
27
- <p>This footnote has a reference number<sup id="fnref:3" role="doc-noteref"><a href="#fn:3" class="footnote">[footnote 3]</a></sup>.</p>
27
+ <p>This footnote has a reference number<sup id="fnref:3" role="doc-noteref"><a href="#fn:3" class="footnote" rel="footnote">[footnote 3]</a></sup>.</p>
28
28
 
29
- <p>And this footnote has the same reference number<sup id="fnref:3:1" role="doc-noteref"><a href="#fn:3" class="footnote">[footnote 3]</a></sup>.</p>
29
+ <p>And this footnote has the same reference number<sup id="fnref:3:1" role="doc-noteref"><a href="#fn:3" class="footnote" rel="footnote">[footnote 3]</a></sup>.</p>
30
30
 
31
31
  <div class="footnotes" role="doc-endnotes">
32
32
  <ol>
@@ -30,7 +30,7 @@ class GovspeakTest < Minitest::Test
30
30
 
31
31
  test "stat-headline block extension" do
32
32
  rendered = Govspeak::Document.new("this \n{stat-headline}*13.8bn* Age of the universe in years{/stat-headline}").to_html
33
- assert_equal %(<p>this</p>\n\n<aside class="stat-headline">\n<p><em>13.8bn</em> Age of the universe in years</p>\n</aside>\n), rendered
33
+ assert_equal %(<p>this</p>\n\n<div class="stat-headline">\n<p><em>13.8bn</em> Age of the universe in years</p>\n</div>\n), rendered
34
34
  end
35
35
 
36
36
  test "extracts headers with text, level and generated id" do
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.0
4
+ version: 6.7.1
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-03-02 00:00:00.000000000 Z
11
+ date: 2021-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -372,24 +372,24 @@ signing_key:
372
372
  specification_version: 4
373
373
  summary: Markup language for single domain
374
374
  test_files:
375
- - test/govspeak_footnote_test.rb
376
- - test/html_sanitizer_test.rb
377
- - test/govspeak_test.rb
378
- - test/test_helper.rb
379
- - test/blockquote_extra_quote_remover_test.rb
380
- - test/govspeak_button_test.rb
381
- - test/html_validator_test.rb
375
+ - test/govspeak_images_bang_test.rb
376
+ - test/govspeak_attachment_test.rb
382
377
  - test/govspeak_link_extractor_test.rb
383
- - test/govspeak_attachment_link_test.rb
384
- - test/govspeak_link_test.rb
385
- - test/govspeak_contacts_test.rb
378
+ - test/govspeak_attachments_inline_test.rb
379
+ - test/govspeak_button_test.rb
386
380
  - test/govspeak_structured_headers_test.rb
387
- - test/govspeak_images_test.rb
381
+ - test/govspeak_attachments_image_test.rb
382
+ - test/govspeak_attachment_link_test.rb
388
383
  - test/govspeak_extract_contact_content_ids_test.rb
389
- - test/govspeak_table_with_headers_test.rb
390
- - test/govspeak_attachment_test.rb
391
- - test/govspeak_attachments_inline_test.rb
392
384
  - test/presenters/h_card_presenter_test.rb
385
+ - test/govspeak_test.rb
386
+ - test/html_sanitizer_test.rb
387
+ - test/govspeak_footnote_test.rb
388
+ - test/blockquote_extra_quote_remover_test.rb
389
+ - test/test_helper.rb
390
+ - test/govspeak_table_with_headers_test.rb
391
+ - test/govspeak_images_test.rb
392
+ - test/govspeak_link_test.rb
393
+ - test/html_validator_test.rb
394
+ - test/govspeak_contacts_test.rb
393
395
  - test/govspeak_test_helper.rb
394
- - test/govspeak_images_bang_test.rb
395
- - test/govspeak_attachments_image_test.rb