govspeak 7.0.1 → 7.0.2

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: 8013e06cbc3f6f61be8953690c30bf05999ee7b405127bf9ab05566021dff5d6
4
- data.tar.gz: d0db3c14af86be0a18662a1aacc9d6f058e0e72295957c478206e41dc97ca06f
3
+ metadata.gz: 14fa86649f2bb73e47685e2fb16ae978b1dff2a3f7bef496fd7520186547d854
4
+ data.tar.gz: 203651a48459e58f8974a4621ba3ea0651133077c79b94d0cbf489df8049ceae
5
5
  SHA512:
6
- metadata.gz: 07aedd1b981eb39f4b13327cb1192b598fbd0b90a1fc5f0a3c85d05e9baa428022435fe1891cbd576b824f410b5f9daf68b96d0742dfbdc05abcda1b946cdb9d
7
- data.tar.gz: 75f8333f15d52a9e4e358abf8319daf1e05a2800f347937f2b63c52f1d860d691b30b72013ad07e310e2f9926ed63a8b344b5509271a9161a5a307353ea6feaf
6
+ metadata.gz: 4f9af0743b85af02263ece3934eb4b8df41b25f1dad626bfd65216dd405110b66c08bf32cbcf1c44a93a0678d8934131e37ec0ca66e37148516d9e3e3ca25ff2
7
+ data.tar.gz: 175745b808a77d6d7a60b85b617b1df9596c5c2483d0fac784c1d8c42a2eaea71ee2dc7ffdd0f5968417126b97fea0a1583c70598793795da08bd821fa7b1c21
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 7.0.2
2
+
3
+ * Fix for abbreviations nested in button. [#267] (https://github.com/alphagov/govspeak/pull/267)
4
+
1
5
  ## 7.0.1
2
6
 
3
7
  * Govspeak was stripping superscript from markdown when it shouldn't have. [#264](https://github.com/alphagov/govspeak/pull/264)
@@ -106,7 +106,7 @@ module Govspeak
106
106
  document.css(".govuk-button").map do |el|
107
107
  button_html = GovukPublishingComponents.render(
108
108
  "govuk_publishing_components/components/button",
109
- text: el.inner_html,
109
+ text: el.inner_html.html_safe,
110
110
  href: el["href"],
111
111
  start: el["data-start"],
112
112
  data_attributes: {
@@ -1,3 +1,3 @@
1
1
  module Govspeak
2
- VERSION = "7.0.1".freeze
2
+ VERSION = "7.0.2".freeze
3
3
  end
@@ -110,4 +110,15 @@ class GovspeakTest < Minitest::Test
110
110
  lorem lorem lorem</p>
111
111
  )
112
112
  end
113
+
114
+ test_given_govspeak "
115
+ {button start}[Start now JSA](https://www.apply-for-new-style-jsa.dwp.gov.uk/?lang=cy){/button}
116
+ \n\n
117
+ *[JSA]: Jobseeker's Allowance
118
+ " do
119
+ assert_text_output "Start now JSA"
120
+ assert_html_output %(
121
+ <p><a class="gem-c-button govuk-button govuk-button--start" role="button" data-module="govuk-button" draggable="false" href="https://www.apply-for-new-style-jsa.dwp.gov.uk/?lang=cy"> Start now <abbr title="Jobseeker's Allowance">JSA</abbr><svg class="govuk-button__start-icon govuk-!-display-none-print" xmlns="http://www.w3.org/2000/svg" width="17.5" height="19" viewbox="0 0 33 40" focusable="false" aria-hidden="true"><path fill="currentColor" d="M0 0h13l20 20-20 20H0l20-20z"></path></svg></a></p>
122
+ )
123
+ end
113
124
  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: 7.0.1
4
+ version: 7.0.2
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: 2022-12-16 00:00:00.000000000 Z
11
+ date: 2023-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -327,7 +327,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
327
327
  - !ruby/object:Gem::Version
328
328
  version: '0'
329
329
  requirements: []
330
- rubygems_version: 3.3.26
330
+ rubygems_version: 3.4.2
331
331
  signing_key:
332
332
  specification_version: 4
333
333
  summary: Markup language for single domain