@x-govuk/nhsuk-eleventy-plugin 1.4.2 → 1.4.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x-govuk/nhsuk-eleventy-plugin",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "description": "Write documentation using Markdown and publish it using NHS.UK styles",
5
5
  "keywords": [
6
6
  "nhsuk",
@@ -60,11 +60,11 @@
60
60
  "@x-govuk/govuk-eleventy-plugin": "^9.0.2",
61
61
  "accessible-autocomplete": "^3.0.1",
62
62
  "deepmerge": "^4.3.1",
63
- "highlight.js": "^11.11.1",
63
+ "highlight.js": "^11.12.0",
64
64
  "markdown-it-abbr": "^2.0.0",
65
- "markdown-it-anchor": "^9.2.1",
65
+ "markdown-it-anchor": "^10.0.0",
66
66
  "markdown-it-attribution": "^0.1.4",
67
- "markdown-it-attrs": "^5.0.0",
67
+ "markdown-it-attrs": "^5.0.1",
68
68
  "markdown-it-deflist": "^4.0.0",
69
69
  "markdown-it-footnote": "^4.0.0",
70
70
  "markdown-it-github-alerts": "^1.0.1",
@@ -75,22 +75,22 @@
75
75
  "markdown-it-sub": "^2.0.0",
76
76
  "markdown-it-sup": "^2.0.0",
77
77
  "markdown-it-table-of-contents": "^1.2.0",
78
- "nhsuk-frontend": "^10.6.0",
78
+ "nhsuk-frontend": "^10.6.1",
79
79
  "rollup": "^4.62.2",
80
- "sass": "^1.101.0"
80
+ "sass": "^1.104.1"
81
81
  },
82
82
  "devDependencies": {
83
- "@x-govuk/eslint-config": "^0.0.2",
83
+ "@x-govuk/eslint-config": "^0.0.3",
84
84
  "@x-govuk/nhsuk-eleventy-plugin": "file:./",
85
- "np": "^12.0.0",
86
- "prettier": "^3.9.5",
87
- "stylelint": "^17.14.0",
85
+ "np": "^12.1.1",
86
+ "prettier": "^3.9.8",
87
+ "stylelint": "^17.15.0",
88
88
  "stylelint-config-gds": "^3.0.0",
89
89
  "stylelint-order": "^8.1.1"
90
90
  },
91
91
  "peerDependencies": {
92
- "@sindresorhus/slugify": "^3.0.0",
93
- "markdown-it": "^14.2.0",
92
+ "@sindresorhus/slugify": "^3.0.1",
93
+ "markdown-it": "^15.0.2",
94
94
  "nunjucks": "^3.2.4"
95
95
  },
96
96
  "engines": {
@@ -28,11 +28,6 @@ $_input-padding-right: nhsuk-px-to-rem(12px + $_icon-size);
28
28
  border-radius: $nhsuk-border-radius;
29
29
  padding-right: $_input-padding-right;
30
30
  width: 100%;
31
-
32
- &:focus {
33
- background-position: top nhsuk-px-to-rem(3px) right nhsuk-px-to-rem(6px);
34
- padding-right: $_input-padding-right;
35
- }
36
31
  }
37
32
 
38
33
  .nhsuk-header__search-input.app-search__hint {
@@ -23,18 +23,18 @@
23
23
 
24
24
  {{ appDocumentList({
25
25
  headingLevel: 3 if paginationHeading else 2,
26
- items: eleventyPagination.items
26
+ items: pagination.items
27
27
  }) }}
28
28
 
29
29
  {{ nhsukPagination({
30
30
  previous: {
31
- href: eleventyPagination.href.previous
31
+ href: pagination.href.previous
32
32
  },
33
33
  next: {
34
- href: eleventyPagination.href.next
34
+ href: pagination.href.next
35
35
  },
36
- items: eleventyPagination | itemsFromPagination
37
- }) if eleventyPagination.pages.length > 1 }}
36
+ items: pagination | itemsFromPagination
37
+ }) if pagination.pages.length > 1 }}
38
38
 
39
39
  {{ appRelated(related) if related }}
40
40
  {% endblock %}
@@ -30,7 +30,7 @@ import { tableRules } from './markdown-it/table.js'
30
30
  * @returns {import('markdown-it')} markdown-it instance
31
31
  */
32
32
  export function md(markdownOptions = {}) {
33
- const opts = {
33
+ const options = {
34
34
  breaks: true,
35
35
  html: true,
36
36
  linkify: false,
@@ -38,13 +38,19 @@ export function md(markdownOptions = {}) {
38
38
  ...markdownOptions
39
39
  }
40
40
 
41
- const md = new MarkdownIt(opts)
42
- .use(markdownItGovuk, {
43
- brand: 'nhsuk',
44
- calvert: true,
45
- govspeak: ['blockquote', 'information-callout'],
46
- headingsStartWith: markdownOptions.headingsStartWith
47
- })
41
+ const md = new MarkdownIt(options)
42
+
43
+ // markdown-it-attribution still calls `md.utils.assign`, a helper that
44
+ // was removed from markdown-it in v14+ (it uses Object.assign internally
45
+ // now). Restore it before loading the plugin so it doesn’t crash.
46
+ md.utils.assign = Object.assign
47
+
48
+ md.use(markdownItGovuk, {
49
+ brand: 'nhsuk',
50
+ calvert: true,
51
+ govspeak: ['blockquote', 'information-callout'],
52
+ headingsStartWith: markdownOptions.headingsStartWith
53
+ })
48
54
  .use(nhsukCodePlugin)
49
55
  .use(markdownItAbbr)
50
56
  .use(markdownItAnchor, {