govspeak 6.7.7 → 6.7.8

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: eeb616e6f8489b589e1ddda16e92727ec5c30a9ad76b88e89184aad8590276e3
4
- data.tar.gz: cc776bc6208ca7baafce665f4c92a549f2ee6c70fa96652e81e2ed8a32a45f5a
3
+ metadata.gz: 709c3fbb62a1b1e54cae82fd1539785acaaf3586c0a094b402880bf4608df065
4
+ data.tar.gz: 1300878c1001b40ade71a2e5446ea1f62ea8cd1e5d764e97ef9450da6124d74a
5
5
  SHA512:
6
- metadata.gz: cb08b6e651a21f26ae42efff15d74b80401b1dc26fd516b69b02394b9eeaa20825aa4e176ef789a35ae035bb5d8be13012fb42e35c88e1e487870c81c8c4d0af
7
- data.tar.gz: 1dc3a85af8fb5ecacb8c9a530739e8f3742fa9ea79bd3830c73c2c5d36b907d737aec74e028a4df197f11e1c0bd7d55eb25e3f5d0009a22a930cfb4e0b449f50
6
+ metadata.gz: dcf825ebf9e77452c200104606486d9c0ad26c5f00855ce69c3c127d5e6cd7357d804fb3df77b3362fe797e814ed2cffe3823c2a835d1784e89b25c459abfd12
7
+ data.tar.gz: 607b7b974bf443801e83ec7afaab1449e00a50d63134dc90b912f62a5a5c0635ea2e54afece268dbe6c4471cc232c4f12033bef6f8961aee1816a4cd6f1fcc25
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 6.7.8
2
+
3
+ * Fixes bug which reverts acronyms from being converted into abbr tags [#229](https://github.com/alphagov/govspeak/pull/229)
4
+
1
5
  ## 6.7.7
2
6
 
3
7
  * Fix broken HTML in CTA extension. [#226](https://github.com/alphagov/govspeak/pull/226)
data/README.md CHANGED
@@ -28,8 +28,7 @@ Once govspeak has been updated and version incremented then:
28
28
 
29
29
  Also, consider if:
30
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
31
+ - [govpspeak-preview](https://github.com/alphagov/govspeak-preview) needs updating
33
32
 
34
33
  Any pages that use govspeak to generate Content will need to *republished* in order for the new changes to be reflected.
35
34
 
@@ -1,3 +1,3 @@
1
1
  module Govspeak
2
- VERSION = "6.7.7".freeze
2
+ VERSION = "6.7.8".freeze
3
3
  end
data/lib/govspeak.rb CHANGED
@@ -464,9 +464,10 @@ module Govspeak
464
464
  end
465
465
 
466
466
  def add_acronym_alt_text(html)
467
- @acronyms.each do |acronym|
468
- html.gsub!(acronym[0], "<abbr title=\"#{acronym[1].strip}\">#{acronym[0]}</abbr>")
469
- end
467
+ # FIXME: this code is buggy and replaces abbreviations in HTML tags - removing the functionality for now
468
+ # @acronyms.each do |acronym|
469
+ # html.gsub!(acronym[0], "<abbr title=\"#{acronym[1].strip}\">#{acronym[0]}</abbr>")
470
+ # end
470
471
  end
471
472
  end
472
473
  end
@@ -1048,43 +1048,44 @@ Teston
1048
1048
  )
1049
1049
  end
1050
1050
 
1051
- test_given_govspeak "
1052
- $LegislativeList
1053
- * 1. Item 1[^1] with an ACRONYM
1054
- * 2. Item 2[^2]
1055
- * 3. Item 3
1056
- $EndLegislativeList
1057
-
1058
- [^1]: Footnote definition one
1059
- [^2]: Footnote definition two with an ACRONYM
1060
-
1061
- *[ACRONYM]: This is the acronym explanation
1062
- " do
1063
- assert_html_output %(
1064
- <ol class="legislative-list">
1065
- <li>1. Item 1<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">[footnote 1]</a></sup> with an <abbr title="This is the acronym explanation">ACRONYM</abbr>
1066
- </li>
1067
- <li>2. Item 2<sup id="fnref:2" role="doc-noteref"><a href="#fn:2" class="footnote" rel="footnote">[footnote 2]</a></sup>
1068
- </li>
1069
- <li>3. Item 3</li>
1070
- </ol>
1071
-
1072
- <div class="footnotes" role="doc-endnotes">
1073
- <ol>
1074
- <li id="fn:1" role="doc-endnote">
1075
- <p>
1076
- Footnote definition one<a href="#fnref:1" class="reversefootnote" role="doc-backlink" aria-label="go to where this is referenced">↩</a>
1077
- </p>
1078
- </li>
1079
- <li id="fn:2" role="doc-endnote">
1080
- <p>
1081
- Footnote definition two with an <abbr title="This is the acronym explanation">ACRONYM</abbr><a href="#fnref:2" class="reversefootnote" role="doc-backlink" aria-label="go to where this is referenced">↩</a>
1082
- </p>
1083
- </li>
1084
- </ol>
1085
- </div>
1086
- )
1087
- end
1051
+ # FIXME: this code is buggy and replaces abbreviations in HTML tags - removing the functionality for now
1052
+ # test_given_govspeak "
1053
+ # $LegislativeList
1054
+ # * 1. Item 1[^1] with an ACRONYM
1055
+ # * 2. Item 2[^2]
1056
+ # * 3. Item 3
1057
+ # $EndLegislativeList
1058
+ #
1059
+ # [^1]: Footnote definition one
1060
+ # [^2]: Footnote definition two with an ACRONYM
1061
+ #
1062
+ # *[ACRONYM]: This is the acronym explanation
1063
+ # " do
1064
+ # assert_html_output %(
1065
+ # <ol class="legislative-list">
1066
+ # <li>1. Item 1<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">[footnote 1]</a></sup> with an <abbr title="This is the acronym explanation">ACRONYM</abbr>
1067
+ # </li>
1068
+ # <li>2. Item 2<sup id="fnref:2" role="doc-noteref"><a href="#fn:2" class="footnote" rel="footnote">[footnote 2]</a></sup>
1069
+ # </li>
1070
+ # <li>3. Item 3</li>
1071
+ # </ol>
1072
+ #
1073
+ # <div class="footnotes" role="doc-endnotes">
1074
+ # <ol>
1075
+ # <li id="fn:1" role="doc-endnote">
1076
+ # <p>
1077
+ # Footnote definition one<a href="#fnref:1" class="reversefootnote" role="doc-backlink" aria-label="go to where this is referenced">↩</a>
1078
+ # </p>
1079
+ # </li>
1080
+ # <li id="fn:2" role="doc-endnote">
1081
+ # <p>
1082
+ # Footnote definition two with an <abbr title="This is the acronym explanation">ACRONYM</abbr><a href="#fnref:2" class="reversefootnote" role="doc-backlink" aria-label="go to where this is referenced">↩</a>
1083
+ # </p>
1084
+ # </li>
1085
+ # </ol>
1086
+ # </div>
1087
+ # )
1088
+ # end
1088
1089
 
1089
1090
  test_given_govspeak "
1090
1091
  The quick brown
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.7
4
+ version: 6.7.8
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-12-08 00:00:00.000000000 Z
11
+ date: 2022-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview