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 +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +20 -3
- data/lib/govspeak.rb +2 -2
- data/lib/govspeak/version.rb +1 -1
- data/test/govspeak_footnote_test.rb +4 -4
- data/test/govspeak_test.rb +1 -1
- metadata +18 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b07175e22a88ddf687631c2a157d00f9649efc118ab3e535d95cbda00918d43
|
4
|
+
data.tar.gz: 430f7d18852c8fdd549812c0260b118108292f34f2767902217c9d57a80d1f8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
<
|
126
|
+
<div class="stat-headline">
|
110
127
|
<p><em>13.8bn</em> years since the big bang</p>
|
111
|
-
</
|
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<
|
189
|
-
#{Govspeak::Document.new(body.strip).to_html}</
|
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
|
data/lib/govspeak/version.rb
CHANGED
@@ -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>
|
data/test/govspeak_test.rb
CHANGED
@@ -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<
|
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.
|
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-
|
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/
|
376
|
-
- test/
|
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/
|
384
|
-
- test/
|
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/
|
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
|