govspeak 6.5.8 → 6.5.9
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/post_processor.rb +2 -1
- data/lib/govspeak/version.rb +1 -1
- data/test/govspeak_footnote_test.rb +20 -5
- 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: 948aced50c3d3842255ea4206a651229de59b2beef42e0c50e55e204354d9b5f
|
4
|
+
data.tar.gz: cc55abe4b54b112a3aa1cb350a94270b11b9f0c11a5ca71479f55bb0efbf657d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e0c1b0d6ca1fe4999e4135536328ecdc60bd34f368d986a808cee6de687f58198a080c19beffd47df6d80130edd2010eb1a09ccd840ea8adb9375c0b747e533
|
7
|
+
data.tar.gz: e47aeeabecc4ffccff7342d1a1ad2e1ddd6cd8aabf5850f740fa3bf5ecdd9395bbded84222d55a5c8998748d7491a649793c550ab49564cd098486623684b275
|
data/CHANGELOG.md
CHANGED
@@ -126,7 +126,8 @@ module Govspeak
|
|
126
126
|
el.content = "[footnote #{footnote_number}]"
|
127
127
|
end
|
128
128
|
document.css("[role='doc-backlink']").map do |el|
|
129
|
-
|
129
|
+
backlink_number = " " + el.css("sup")[0].content if el.css("sup")[0].present?
|
130
|
+
el["aria-label"] = "go to where this is referenced#{backlink_number}"
|
130
131
|
end
|
131
132
|
end
|
132
133
|
|
data/lib/govspeak/version.rb
CHANGED
@@ -11,21 +11,36 @@ class GovspeakFootnoteTest < Minitest::Test
|
|
11
11
|
|
12
12
|
Footnotes can be added too[^2].
|
13
13
|
|
14
|
-
[^2]: And then later defined too.
|
15
|
-
|
14
|
+
[^2]: And then later defined too.
|
15
|
+
|
16
|
+
This footnote has a reference number[^3].
|
17
|
+
|
18
|
+
And this footnote has the same reference number[^3].
|
19
|
+
|
20
|
+
[^3]: And then they both point here." do
|
21
|
+
assert_html_output(
|
22
|
+
%(
|
16
23
|
<p>Footnotes can be added<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote">[footnote 1]</a></sup>.</p>
|
17
24
|
|
18
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>
|
19
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>
|
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>
|
30
|
+
|
20
31
|
<div class="footnotes" role="doc-endnotes">
|
21
32
|
<ol>
|
22
33
|
<li id="fn:1" role="doc-endnote">
|
23
|
-
<p>And then later defined. <a href="#fnref:1" class="reversefootnote" role="doc-backlink"
|
34
|
+
<p>And then later defined. <a href="#fnref:1" class="reversefootnote" role="doc-backlink" aria-label="go to where this is referenced">↩</a></p>
|
24
35
|
</li>
|
25
36
|
<li id="fn:2" role="doc-endnote">
|
26
|
-
<p>And then later defined too. <a href="#fnref:2" class="reversefootnote" role="doc-backlink"
|
37
|
+
<p>And then later defined too. <a href="#fnref:2" class="reversefootnote" role="doc-backlink" aria-label="go to where this is referenced">↩</a></p>
|
38
|
+
</li>
|
39
|
+
<li id="fn:3" role="doc-endnote">
|
40
|
+
<p>And then they both point here. <a href="#fnref:3" class="reversefootnote" role="doc-backlink" aria-label="go to where this is referenced">↩</a> <a href="#fnref:3:1" class="reversefootnote" role="doc-backlink" aria-label="go to where this is referenced 2">↩<sup>2</sup></a></p>
|
27
41
|
</li>
|
28
42
|
</ol>
|
29
|
-
</div>
|
43
|
+
</div>),
|
44
|
+
)
|
30
45
|
end
|
31
46
|
end
|
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.9
|
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-
|
11
|
+
date: 2020-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|
@@ -378,24 +378,24 @@ signing_key:
|
|
378
378
|
specification_version: 4
|
379
379
|
summary: Markup language for single domain
|
380
380
|
test_files:
|
381
|
-
- test/
|
382
|
-
- test/
|
383
|
-
- test/govspeak_test.rb
|
384
|
-
- test/test_helper.rb
|
385
|
-
- test/blockquote_extra_quote_remover_test.rb
|
386
|
-
- test/govspeak_button_test.rb
|
387
|
-
- test/html_validator_test.rb
|
381
|
+
- test/govspeak_images_bang_test.rb
|
382
|
+
- test/govspeak_attachment_test.rb
|
388
383
|
- test/govspeak_link_extractor_test.rb
|
389
|
-
- test/
|
390
|
-
- test/
|
391
|
-
- test/govspeak_contacts_test.rb
|
384
|
+
- test/govspeak_attachments_inline_test.rb
|
385
|
+
- test/govspeak_button_test.rb
|
392
386
|
- test/govspeak_structured_headers_test.rb
|
393
|
-
- test/
|
387
|
+
- test/govspeak_attachments_image_test.rb
|
388
|
+
- test/govspeak_attachment_link_test.rb
|
394
389
|
- test/govspeak_extract_contact_content_ids_test.rb
|
395
|
-
- test/govspeak_table_with_headers_test.rb
|
396
|
-
- test/govspeak_attachment_test.rb
|
397
|
-
- test/govspeak_attachments_inline_test.rb
|
398
390
|
- test/presenters/h_card_presenter_test.rb
|
391
|
+
- test/govspeak_test.rb
|
392
|
+
- test/html_sanitizer_test.rb
|
393
|
+
- test/govspeak_footnote_test.rb
|
394
|
+
- test/blockquote_extra_quote_remover_test.rb
|
395
|
+
- test/test_helper.rb
|
396
|
+
- test/govspeak_table_with_headers_test.rb
|
397
|
+
- test/govspeak_images_test.rb
|
398
|
+
- test/govspeak_link_test.rb
|
399
|
+
- test/html_validator_test.rb
|
400
|
+
- test/govspeak_contacts_test.rb
|
399
401
|
- test/govspeak_test_helper.rb
|
400
|
-
- test/govspeak_images_bang_test.rb
|
401
|
-
- test/govspeak_attachments_image_test.rb
|