govuk_publishing_components 21.27.1 → 21.28.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +9 -9
  3. data/app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss +17 -2
  4. data/app/controllers/govuk_publishing_components/component_guide_controller.rb +6 -6
  5. data/app/models/govuk_publishing_components/component_doc.rb +1 -1
  6. data/app/models/govuk_publishing_components/component_docs.rb +2 -2
  7. data/app/models/govuk_publishing_components/component_example.rb +4 -4
  8. data/app/views/govuk_publishing_components/components/_input.html.erb +11 -0
  9. data/app/views/govuk_publishing_components/components/_previous_and_next_navigation.html.erb +2 -2
  10. data/app/views/govuk_publishing_components/components/docs/button.yml +9 -1
  11. data/app/views/govuk_publishing_components/components/docs/input.yml +7 -0
  12. data/config/routes.rb +5 -5
  13. data/lib/generators/govuk_publishing_components/component_generator.rb +7 -7
  14. data/lib/govuk_publishing_components.rb +2 -2
  15. data/lib/govuk_publishing_components/app_helpers/taxon_breadcrumbs.rb +1 -1
  16. data/lib/govuk_publishing_components/engine.rb +1 -1
  17. data/lib/govuk_publishing_components/minitest/component_guide_test.rb +4 -4
  18. data/lib/govuk_publishing_components/presenters/breadcrumbs.rb +9 -9
  19. data/lib/govuk_publishing_components/presenters/button_helper.rb +20 -10
  20. data/lib/govuk_publishing_components/presenters/checkboxes_helper.rb +2 -2
  21. data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_parent.rb +1 -1
  22. data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_taxons.rb +3 -3
  23. data/lib/govuk_publishing_components/presenters/contents_list_helper.rb +5 -5
  24. data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +5 -5
  25. data/lib/govuk_publishing_components/presenters/curated_taxonomy_sidebar_links.rb +5 -5
  26. data/lib/govuk_publishing_components/presenters/image_card_helper.rb +3 -3
  27. data/lib/govuk_publishing_components/presenters/machine_readable/article_schema.rb +1 -1
  28. data/lib/govuk_publishing_components/presenters/machine_readable/creative_work_schema.rb +9 -9
  29. data/lib/govuk_publishing_components/presenters/machine_readable/dataset_schema.rb +2 -2
  30. data/lib/govuk_publishing_components/presenters/machine_readable/faq_page_schema.rb +3 -3
  31. data/lib/govuk_publishing_components/presenters/machine_readable/government_service_schema.rb +10 -10
  32. data/lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb +1 -1
  33. data/lib/govuk_publishing_components/presenters/machine_readable/is_part_of_schema.rb +1 -1
  34. data/lib/govuk_publishing_components/presenters/machine_readable/organisation_schema.rb +5 -5
  35. data/lib/govuk_publishing_components/presenters/machine_readable/person_schema.rb +3 -3
  36. data/lib/govuk_publishing_components/presenters/machine_readable/potential_search_action_schema.rb +3 -3
  37. data/lib/govuk_publishing_components/presenters/meta_tags.rb +6 -6
  38. data/lib/govuk_publishing_components/presenters/organisation_logo_helper.rb +1 -1
  39. data/lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation.rb +3 -3
  40. data/lib/govuk_publishing_components/presenters/related_navigation_helper.rb +32 -32
  41. data/lib/govuk_publishing_components/presenters/schema_org.rb +13 -13
  42. data/lib/govuk_publishing_components/presenters/select.rb +1 -1
  43. data/lib/govuk_publishing_components/presenters/step_by_step_nav_helper.rb +9 -9
  44. data/lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb +1 -1
  45. data/lib/govuk_publishing_components/version.rb +1 -1
  46. data/lib/tasks/govuk_publishing_components_tasks.rake +7 -7
  47. data/node_modules/axe-core/CHANGELOG.md +18 -0
  48. data/node_modules/axe-core/README.md +9 -6
  49. data/node_modules/axe-core/axe.js +71 -20
  50. data/node_modules/axe-core/axe.min.js +2 -2
  51. data/node_modules/axe-core/bower.json +1 -1
  52. data/node_modules/axe-core/doc/API.md +4 -7
  53. data/node_modules/axe-core/doc/backwards-compatibility-doc.md +2 -1
  54. data/node_modules/axe-core/doc/rule-descriptions.md +129 -91
  55. data/node_modules/axe-core/lib/checks/aria/invalidrole.js +12 -9
  56. data/node_modules/axe-core/lib/checks/keyboard/page-has-elm.js +1 -1
  57. data/node_modules/axe-core/lib/checks/language/has-lang.js +10 -5
  58. data/node_modules/axe-core/lib/checks/navigation/region.js +7 -2
  59. data/node_modules/axe-core/lib/commons/aria/index.js +6 -11
  60. data/node_modules/axe-core/lib/commons/dom/url-props-from-attribute.js +15 -6
  61. data/node_modules/axe-core/lib/core/utils/get-check-message.js +21 -0
  62. data/node_modules/axe-core/lib/rules/area-alt.json +2 -0
  63. data/node_modules/axe-core/lib/rules/aria-roles.json +1 -0
  64. data/node_modules/axe-core/lib/rules/color-contrast-matches.js +26 -0
  65. data/node_modules/axe-core/lib/rules/label-content-name-mismatch-matches.js +4 -1
  66. data/node_modules/axe-core/lib/rules/no-empty-role-matches.js +9 -0
  67. data/node_modules/axe-core/lib/rules/skip-link-matches.js +1 -1
  68. data/node_modules/axe-core/package.json +12 -12
  69. data/node_modules/axe-core/sri-history.json +4 -0
  70. data/node_modules/govuk-frontend/govuk/all.js +21 -31
  71. data/node_modules/govuk-frontend/govuk/components/button/template.njk +1 -1
  72. data/node_modules/govuk-frontend/govuk/components/character-count/macro-options.json +1 -1
  73. data/node_modules/govuk-frontend/govuk/components/checkboxes/macro-options.json +1 -1
  74. data/node_modules/govuk-frontend/govuk/components/date-input/macro-options.json +1 -1
  75. data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +1 -1
  76. data/node_modules/govuk-frontend/govuk/components/file-upload/macro-options.json +1 -1
  77. data/node_modules/govuk-frontend/govuk/components/footer/template.njk +1 -1
  78. data/node_modules/govuk-frontend/govuk/components/header/template.njk +1 -1
  79. data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +1 -1
  80. data/node_modules/govuk-frontend/govuk/components/radios/macro-options.json +1 -1
  81. data/node_modules/govuk-frontend/govuk/components/select/macro-options.json +1 -1
  82. data/node_modules/govuk-frontend/govuk/components/skip-link/macro-options.json +2 -2
  83. data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +20 -30
  84. data/node_modules/govuk-frontend/govuk/components/tabs/template.njk +2 -2
  85. data/node_modules/govuk-frontend/govuk/components/tag/_tag.scss +47 -0
  86. data/node_modules/govuk-frontend/govuk/components/textarea/macro-options.json +1 -1
  87. data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +4 -4
  88. data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +5 -5
  89. data/node_modules/govuk-frontend/govuk/helpers/_visually-hidden.scss +29 -29
  90. data/node_modules/govuk-frontend/govuk/overrides/_display.scss +6 -0
  91. data/node_modules/govuk-frontend/govuk/tools/_iff.scss +3 -1
  92. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/closest.js +1 -1
  93. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js +10 -16
  94. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js +10 -14
  95. data/node_modules/govuk-frontend/package.json +10 -10
  96. metadata +32 -16
@@ -24,7 +24,7 @@ module GovukPublishingComponents
24
24
  @id = options[:id] || "checkboxes-#{SecureRandom.hex(4)}"
25
25
  @heading = options[:heading] || nil
26
26
  @heading_size = options[:heading_size]
27
- @heading_size = 'm' unless %w(s m l xl).include?(@heading_size)
27
+ @heading_size = "m" unless %w(s m l xl).include?(@heading_size)
28
28
  @heading_caption = options[:heading_caption] || nil
29
29
  @is_page_heading = options[:is_page_heading]
30
30
  @description = options[:description] || nil
@@ -54,7 +54,7 @@ module GovukPublishingComponents
54
54
  if @is_page_heading
55
55
  content_tag(
56
56
  :legend,
57
- class: "govuk-fieldset__legend govuk-fieldset__legend--xl gem-c-title"
57
+ class: "govuk-fieldset__legend govuk-fieldset__legend--xl gem-c-title",
58
58
  ) do
59
59
  concat content_tag(:span, heading_caption, class: "govuk-caption-xl") if heading_caption.present?
60
60
  concat content_tag(:h1, @heading, class: "gem-c-title__text")
@@ -14,7 +14,7 @@ module GovukPublishingComponents
14
14
  ordered_parents << { title: "Home", url: "/" }
15
15
 
16
16
  {
17
- breadcrumbs: ordered_parents.reverse
17
+ breadcrumbs: ordered_parents.reverse,
18
18
  }
19
19
  end
20
20
 
@@ -11,18 +11,18 @@ module GovukPublishingComponents
11
11
  {
12
12
  title: parent.title,
13
13
  url: parent.base_path,
14
- is_page_parent: index.zero?
14
+ is_page_parent: index.zero?,
15
15
  }
16
16
  end
17
17
 
18
18
  ordered_parents << {
19
19
  title: "Home",
20
20
  url: "/",
21
- is_page_parent: ordered_parents.empty?
21
+ is_page_parent: ordered_parents.empty?,
22
22
  }
23
23
 
24
24
  {
25
- breadcrumbs: ordered_parents.reverse
25
+ breadcrumbs: ordered_parents.reverse,
26
26
  }
27
27
  end
28
28
 
@@ -1,4 +1,4 @@
1
- require 'action_view'
1
+ require "action_view"
2
2
 
3
3
  module GovukPublishingComponents
4
4
  module Presenters
@@ -36,7 +36,7 @@ module GovukPublishingComponents
36
36
  number = /^\d{1,3}(\.?|\.\d{1,2})(?=\s)/.match(content_item_text)
37
37
 
38
38
  if number
39
- words = content_item_text.sub(number.to_s, '').strip #remove the number from the text
39
+ words = content_item_text.sub(number.to_s, "").strip #remove the number from the text
40
40
  content_item_link.sub(content_item_text, "<span class=\"gem-c-contents-list__number\">#{number} </span><span class=\"gem-c-contents-list__numbered-text\">#{words}</span>").squish.html_safe
41
41
  else
42
42
  content_item_link
@@ -47,11 +47,11 @@ module GovukPublishingComponents
47
47
 
48
48
  def parent_modifier
49
49
  if @nested
50
- 'parent'
50
+ "parent"
51
51
  elsif @format_numbers
52
- 'numbered'
52
+ "numbered"
53
53
  else
54
- 'dashed'
54
+ "dashed"
55
55
  end
56
56
  end
57
57
  end
@@ -8,12 +8,12 @@ module GovukPublishingComponents
8
8
  # @param request_path `request.path`
9
9
  def initialize(content_item, request)
10
10
  @content_item = content_item
11
- @request_path = simple_smart_answer? ? content_item['base_path'] : request.path
11
+ @request_path = simple_smart_answer? ? content_item["base_path"] : request.path
12
12
  @query_parameters = request.query_parameters
13
13
  end
14
14
 
15
15
  def simple_smart_answer?
16
- content_item['document_type'] === "simple_smart_answer"
16
+ content_item["document_type"] === "simple_smart_answer"
17
17
  end
18
18
 
19
19
  def taxon_breadcrumbs
@@ -31,9 +31,9 @@ module GovukPublishingComponents
31
31
  url: "/",
32
32
  },
33
33
  {
34
- title: parent_finder['title'],
35
- url: parent_finder['base_path'],
36
- }
34
+ title: parent_finder["title"],
35
+ url: parent_finder["base_path"],
36
+ },
37
37
  ]
38
38
  else
39
39
  ContentBreadcrumbsBasedOnParent.new(content_item).breadcrumbs[:breadcrumbs]
@@ -1,4 +1,4 @@
1
- require 'set'
1
+ require "set"
2
2
 
3
3
  module GovukPublishingComponents
4
4
  module Presenters
@@ -34,7 +34,7 @@ module GovukPublishingComponents
34
34
 
35
35
  [
36
36
  {
37
- title: 'Elsewhere on GOV.UK',
37
+ title: "Elsewhere on GOV.UK",
38
38
  related_content: format_for_sidebar(elsewhere_items),
39
39
  },
40
40
  ]
@@ -45,14 +45,14 @@ module GovukPublishingComponents
45
45
 
46
46
  external_links = @content_item.external_links.map do |link|
47
47
  {
48
- title: link['title'],
49
- link: link['url'],
48
+ title: link["title"],
49
+ link: link["url"],
50
50
  }
51
51
  end
52
52
 
53
53
  [
54
54
  {
55
- title: 'Elsewhere on the web',
55
+ title: "Elsewhere on the web",
56
56
  related_content: external_links,
57
57
  },
58
58
  ]
@@ -42,10 +42,10 @@ module GovukPublishingComponents
42
42
  def context
43
43
  return unless @context
44
44
 
45
- content_tag(:p, class: 'gem-c-image-card__context') do
45
+ content_tag(:p, class: "gem-c-image-card__context") do
46
46
  if @context[:date]
47
- date = content_tag(:time, l(@context[:date], format: '%e %B %Y'), datetime: @context[:date].iso8601)
48
- dash = content_tag(:span, '', 'aria-hidden': true)
47
+ date = content_tag(:time, l(@context[:date], format: "%e %B %Y"), datetime: @context[:date].iso8601)
48
+ dash = content_tag(:span, "", 'aria-hidden': true)
49
49
 
50
50
  if @context[:text]
51
51
  date.concat(dash).concat(@context[:text])
@@ -24,7 +24,7 @@ module GovukPublishingComponents
24
24
  return {} unless page.body.present?
25
25
 
26
26
  {
27
- "articleBody" => page.body
27
+ "articleBody" => page.body,
28
28
  }
29
29
  end
30
30
 
@@ -28,8 +28,8 @@ module GovukPublishingComponents
28
28
  "logo" => {
29
29
  "@type" => "ImageObject",
30
30
  "url" => page.logo_url,
31
- }
32
- }
31
+ },
32
+ },
33
33
  }.merge(image_schema).merge(author_schema).merge(is_part_of).merge(about).merge(has_part)
34
34
  end
35
35
 
@@ -39,7 +39,7 @@ module GovukPublishingComponents
39
39
 
40
40
  def image_schema
41
41
  {
42
- "image" => page.has_image? ? [page.image_url] : page.image_placeholders
42
+ "image" => page.has_image? ? [page.image_url] : page.image_placeholders,
43
43
  }
44
44
  end
45
45
 
@@ -51,7 +51,7 @@ module GovukPublishingComponents
51
51
  "@type" => "Organization",
52
52
  "name" => publishing_organisation["title"],
53
53
  "url" => Plek.current.website_root + publishing_organisation["base_path"],
54
- }
54
+ },
55
55
  }
56
56
  end
57
57
 
@@ -63,7 +63,7 @@ module GovukPublishingComponents
63
63
  return {} unless document_collections.any?
64
64
 
65
65
  {
66
- "isPartOf" => document_collections
66
+ "isPartOf" => document_collections,
67
67
  }
68
68
  end
69
69
 
@@ -72,7 +72,7 @@ module GovukPublishingComponents
72
72
  content_item: step_by_step,
73
73
  schema: :article,
74
74
  logo_url: page.logo_url,
75
- image_placeholders: page.image_placeholders
75
+ image_placeholders: page.image_placeholders,
76
76
  )
77
77
  end
78
78
 
@@ -80,7 +80,7 @@ module GovukPublishingComponents
80
80
  return {} unless collection_pages("documents").any?
81
81
 
82
82
  {
83
- "hasPart" => collection_pages("documents").map { |document| HasPartSchema.new(document).structured_data }
83
+ "hasPart" => collection_pages("documents").map { |document| HasPartSchema.new(document).structured_data },
84
84
  }
85
85
  end
86
86
 
@@ -101,7 +101,7 @@ module GovukPublishingComponents
101
101
  return {} unless live_taxons.any?
102
102
 
103
103
  {
104
- "about" => linked_taxons
104
+ "about" => linked_taxons,
105
105
  }
106
106
  end
107
107
 
@@ -117,7 +117,7 @@ module GovukPublishingComponents
117
117
  {
118
118
  "@context" => "http://schema.org",
119
119
  "@type" => "Thing",
120
- "sameAs" => taxon["web_url"]
120
+ "sameAs" => taxon["web_url"],
121
121
  }
122
122
  end
123
123
  end
@@ -20,13 +20,13 @@ module GovukPublishingComponents
20
20
 
21
21
  def description
22
22
  {
23
- "description" => (page.body || page.description).slice(0..4999)
23
+ "description" => (page.body || page.description).slice(0..4999),
24
24
  }
25
25
  end
26
26
 
27
27
  def name
28
28
  {
29
- "name" => page.title
29
+ "name" => page.title,
30
30
  }
31
31
  end
32
32
  end
@@ -19,7 +19,7 @@ module GovukPublishingComponents
19
19
 
20
20
  def main_entity
21
21
  {
22
- "mainEntity" => questions_and_answers_markup
22
+ "mainEntity" => questions_and_answers_markup,
23
23
  }
24
24
  end
25
25
 
@@ -36,8 +36,8 @@ module GovukPublishingComponents
36
36
  "acceptedAnswer" => {
37
37
  "@type" => "Answer",
38
38
  "url" => q_and_a_url,
39
- "text" => value[:answer]
40
- }
39
+ "text" => value[:answer],
40
+ },
41
41
  }
42
42
  end
43
43
  end
@@ -14,7 +14,7 @@ module GovukPublishingComponents
14
14
  "@type" => "GovernmentService",
15
15
  "name" => page.title,
16
16
  "description" => page.description,
17
- "url" => page.canonical_url
17
+ "url" => page.canonical_url,
18
18
  }
19
19
  .merge(provider)
20
20
  .merge(related_services)
@@ -23,38 +23,38 @@ module GovukPublishingComponents
23
23
  private
24
24
 
25
25
  def related_services
26
- related_links = page.content_item.dig('links', 'ordered_related_items')
26
+ related_links = page.content_item.dig("links", "ordered_related_items")
27
27
 
28
28
  return {} unless related_links.present?
29
29
 
30
30
  {
31
31
  "isRelatedTo" => related_links.each_with_object([]) do |link, items|
32
- if link['schema_name'] == 'transaction'
32
+ if link["schema_name"] == "transaction"
33
33
  items << {
34
34
  "@type" => "GovernmentService",
35
- "name" => link['title'],
36
- "url" => link['web_url']
35
+ "name" => link["title"],
36
+ "url" => link["web_url"],
37
37
  }
38
38
  end
39
- end
39
+ end,
40
40
  }
41
41
  end
42
42
 
43
43
  def provider
44
- organisations = page.content_item.dig('links', 'organisations')
44
+ organisations = page.content_item.dig("links", "organisations")
45
45
 
46
46
  return {} unless organisations.present?
47
47
 
48
48
  providers = organisations.map do |organisation|
49
49
  {
50
50
  "@type" => "GovernmentOrganization",
51
- "name" => organisation['title'],
52
- "url" => organisation['web_url']
51
+ "name" => organisation["title"],
52
+ "url" => organisation["web_url"],
53
53
  }
54
54
  end
55
55
 
56
56
  {
57
- "provider" => providers
57
+ "provider" => providers,
58
58
  }
59
59
  end
60
60
  end
@@ -12,7 +12,7 @@ module GovukPublishingComponents
12
12
  {
13
13
  "@context" => "http://schema.org",
14
14
  "@type" => "CreativeWork",
15
- "sameAs" => has_part_url
15
+ "sameAs" => has_part_url,
16
16
  }
17
17
  end
18
18
  end
@@ -10,7 +10,7 @@ module GovukPublishingComponents
10
10
  {
11
11
  "@context" => "http://schema.org",
12
12
  "@type" => "CreativeWork",
13
- "sameAs" => @is_part_of_url
13
+ "sameAs" => @is_part_of_url,
14
14
  }
15
15
  end
16
16
  end
@@ -35,7 +35,7 @@ module GovukPublishingComponents
35
35
  end
36
36
 
37
37
  {
38
- "member" => members
38
+ "member" => members,
39
39
  }
40
40
  end
41
41
 
@@ -62,7 +62,7 @@ module GovukPublishingComponents
62
62
  "honorificPrefix" => minister["name_prefix"],
63
63
  "image" => minister.dig("image", "url"),
64
64
  "name" => minister["name"],
65
- "url" => minister_url(minister)
65
+ "url" => minister_url(minister),
66
66
  }
67
67
  end
68
68
 
@@ -72,7 +72,7 @@ module GovukPublishingComponents
72
72
  {
73
73
  "@type" => "Role",
74
74
  "name" => minister["role"],
75
- "url" => role_url(minister)
75
+ "url" => role_url(minister),
76
76
  }
77
77
  end
78
78
 
@@ -107,7 +107,7 @@ module GovukPublishingComponents
107
107
  end
108
108
 
109
109
  {
110
- schema_name => related_orgs
110
+ schema_name => related_orgs,
111
111
  }
112
112
  end
113
113
 
@@ -115,7 +115,7 @@ module GovukPublishingComponents
115
115
  {
116
116
  "@context" => "http://schema.org",
117
117
  "@type" => "GovernmentOrganization",
118
- "sameAs" => url
118
+ "sameAs" => url,
119
119
  }
120
120
  end
121
121
 
@@ -17,7 +17,7 @@ module GovukPublishingComponents
17
17
  "@id" => page.canonical_url,
18
18
  },
19
19
  "name" => page.title,
20
- "description" => page.body
20
+ "description" => page.body,
21
21
  }.merge(image_schema)
22
22
  end
23
23
 
@@ -30,8 +30,8 @@ module GovukPublishingComponents
30
30
 
31
31
  {
32
32
  "image" => [
33
- page.image_url
34
- ]
33
+ page.image_url,
34
+ ],
35
35
  }
36
36
  end
37
37
  end
@@ -1,4 +1,4 @@
1
- require 'plek'
1
+ require "plek"
2
2
 
3
3
  module GovukPublishingComponents
4
4
  module Presenters
@@ -19,8 +19,8 @@ module GovukPublishingComponents
19
19
  "@type": "SearchAction",
20
20
  "description": description,
21
21
  "target": search_template,
22
- "query": "required"
23
- }
22
+ "query": "required",
23
+ },
24
24
  }
25
25
  end
26
26
 
@@ -70,9 +70,9 @@ module GovukPublishingComponents
70
70
 
71
71
  def add_taxonomy_tags(meta_tags)
72
72
  themes = root_taxon_slugs(content_item)
73
- meta_tags["govuk:themes"] = themes.to_a.sort.join(', ') unless themes.empty?
73
+ meta_tags["govuk:themes"] = themes.to_a.sort.join(", ") unless themes.empty?
74
74
 
75
- taxons = if content_item[:document_type] == 'taxon'
75
+ taxons = if content_item[:document_type] == "taxon"
76
76
  [content_item]
77
77
  else
78
78
  links[:taxons] || []
@@ -84,14 +84,14 @@ module GovukPublishingComponents
84
84
  slug_without_theme = base_path[%r{/[^/]+/(.+)}, 1]
85
85
  # Return the slug without the theme, or in the special case of a root taxon,
86
86
  # just return the full slug (because it doesn't have a slug beneath the theme)
87
- slug_without_theme || base_path.sub(%r(^/), '')
87
+ slug_without_theme || base_path.sub(%r(^/), "")
88
88
  end
89
89
  taxon_ids = taxons.map { |taxon| taxon[:content_id] }
90
90
 
91
91
  meta_tags["govuk:taxon-id"] = taxon_ids.first unless taxon_ids.empty?
92
- meta_tags["govuk:taxon-ids"] = taxon_ids.join(',') unless taxon_ids.empty?
92
+ meta_tags["govuk:taxon-ids"] = taxon_ids.join(",") unless taxon_ids.empty?
93
93
  meta_tags["govuk:taxon-slug"] = taxon_slugs_without_theme.first unless taxon_slugs_without_theme.empty?
94
- meta_tags["govuk:taxon-slugs"] = taxon_slugs_without_theme.join(',') unless taxon_slugs_without_theme.empty?
94
+ meta_tags["govuk:taxon-slugs"] = taxon_slugs_without_theme.join(",") unless taxon_slugs_without_theme.empty?
95
95
  meta_tags
96
96
  end
97
97
 
@@ -123,7 +123,7 @@ module GovukPublishingComponents
123
123
  parent_taxons = links[:parent_taxons] || links[:taxons] unless links.nil?
124
124
 
125
125
  if parent_taxons.blank?
126
- root_taxon_set << content_item[:base_path].sub(%r(^/), '') if content_item[:document_type] == 'taxon'
126
+ root_taxon_set << content_item[:base_path].sub(%r(^/), "") if content_item[:document_type] == "taxon"
127
127
  else
128
128
  parent_taxons.each do |parent_taxon|
129
129
  root_taxon_set += root_taxon_slugs(parent_taxon)