-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Nunjucks HTML indentation: Table #4717
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
govuk-design-system-ci
temporarily deployed
to
govuk-frontend-pr-4717
February 2, 2024 17:02
Inactive
📋 StatsFile sizes
Modules
View stats and visualisations on the review app Action run for f120c55 |
Rendered HTML changes to npm packagediff --git a/packages/govuk-frontend/dist/govuk/components/table/template-default.html b/packages/govuk-frontend/dist/govuk/components/table/template-default.html
index 38b5a1c9e..c54750258 100644
--- a/packages/govuk-frontend/dist/govuk/components/table/template-default.html
+++ b/packages/govuk-frontend/dist/govuk/components/table/template-default.html
@@ -1,19 +1,19 @@
<table class="govuk-table">
<tbody class="govuk-table__body">
- <tr class="govuk-table__row">
- <td class="govuk-table__cell">January</td>
- <td class="govuk-table__cell govuk-table__cell--numeric">£85</td>
- <td class="govuk-table__cell govuk-table__cell--numeric">£95</td>
- </tr>
- <tr class="govuk-table__row">
- <td class="govuk-table__cell">February</td>
- <td class="govuk-table__cell govuk-table__cell--numeric">£75</td>
- <td class="govuk-table__cell govuk-table__cell--numeric">£55</td>
- </tr>
- <tr class="govuk-table__row">
- <td class="govuk-table__cell">March</td>
- <td class="govuk-table__cell govuk-table__cell--numeric">£165</td>
- <td class="govuk-table__cell govuk-table__cell--numeric">£125</td>
- </tr>
+ <tr class="govuk-table__row">
+ <td class="govuk-table__cell">January</td>
+ <td class="govuk-table__cell govuk-table__cell--numeric">£85</td>
+ <td class="govuk-table__cell govuk-table__cell--numeric">£95</td>
+ </tr>
+ <tr class="govuk-table__row">
+ <td class="govuk-table__cell">February</td>
+ <td class="govuk-table__cell govuk-table__cell--numeric">£75</td>
+ <td class="govuk-table__cell govuk-table__cell--numeric">£55</td>
+ </tr>
+ <tr class="govuk-table__row">
+ <td class="govuk-table__cell">March</td>
+ <td class="govuk-table__cell govuk-table__cell--numeric">£165</td>
+ <td class="govuk-table__cell govuk-table__cell--numeric">£125</td>
+ </tr>
</tbody>
</table>
diff --git a/packages/govuk-frontend/dist/govuk/components/table/template-table-with-head-and-caption.html b/packages/govuk-frontend/dist/govuk/components/table/template-table-with-head-and-caption.html
index 4b1c8af1e..683906c3d 100644
--- a/packages/govuk-frontend/dist/govuk/components/table/template-table-with-head-and-caption.html
+++ b/packages/govuk-frontend/dist/govuk/components/table/template-table-with-head-and-caption.html
@@ -8,20 +8,20 @@
</tr>
</thead>
<tbody class="govuk-table__body">
- <tr class="govuk-table__row">
- <th scope="row" class="govuk-table__header">January</th>
- <td class="govuk-table__cell govuk-table__cell--numeric">£85</td>
- <td class="govuk-table__cell govuk-table__cell--numeric">£95</td>
- </tr>
- <tr class="govuk-table__row">
- <th scope="row" class="govuk-table__header">February</th>
- <td class="govuk-table__cell govuk-table__cell--numeric">£75</td>
- <td class="govuk-table__cell govuk-table__cell--numeric">£55</td>
- </tr>
- <tr class="govuk-table__row">
- <th scope="row" class="govuk-table__header">March</th>
- <td class="govuk-table__cell govuk-table__cell--numeric">£165</td>
- <td class="govuk-table__cell govuk-table__cell--numeric">£125</td>
- </tr>
+ <tr class="govuk-table__row">
+ <th scope="row" class="govuk-table__header">January</th>
+ <td class="govuk-table__cell govuk-table__cell--numeric">£85</td>
+ <td class="govuk-table__cell govuk-table__cell--numeric">£95</td>
+ </tr>
+ <tr class="govuk-table__row">
+ <th scope="row" class="govuk-table__header">February</th>
+ <td class="govuk-table__cell govuk-table__cell--numeric">£75</td>
+ <td class="govuk-table__cell govuk-table__cell--numeric">£55</td>
+ </tr>
+ <tr class="govuk-table__row">
+ <th scope="row" class="govuk-table__header">March</th>
+ <td class="govuk-table__cell govuk-table__cell--numeric">£165</td>
+ <td class="govuk-table__cell govuk-table__cell--numeric">£125</td>
+ </tr>
</tbody>
</table>
diff --git a/packages/govuk-frontend/dist/govuk/components/table/template-table-with-head.html b/packages/govuk-frontend/dist/govuk/components/table/template-table-with-head.html
index f80371a22..e8950b3b4 100644
--- a/packages/govuk-frontend/dist/govuk/components/table/template-table-with-head.html
+++ b/packages/govuk-frontend/dist/govuk/components/table/template-table-with-head.html
@@ -7,20 +7,20 @@
</tr>
</thead>
<tbody class="govuk-table__body">
- <tr class="govuk-table__row">
- <td class="govuk-table__cell">January</td>
- <td class="govuk-table__cell govuk-table__cell--numeric">£85</td>
- <td class="govuk-table__cell govuk-table__cell--numeric">£95</td>
- </tr>
- <tr class="govuk-table__row">
- <td class="govuk-table__cell">February</td>
- <td class="govuk-table__cell govuk-table__cell--numeric">£75</td>
- <td class="govuk-table__cell govuk-table__cell--numeric">£55</td>
- </tr>
- <tr class="govuk-table__row">
- <td class="govuk-table__cell">March</td>
- <td class="govuk-table__cell govuk-table__cell--numeric">£165</td>
- <td class="govuk-table__cell govuk-table__cell--numeric">£125</td>
- </tr>
+ <tr class="govuk-table__row">
+ <td class="govuk-table__cell">January</td>
+ <td class="govuk-table__cell govuk-table__cell--numeric">£85</td>
+ <td class="govuk-table__cell govuk-table__cell--numeric">£95</td>
+ </tr>
+ <tr class="govuk-table__row">
+ <td class="govuk-table__cell">February</td>
+ <td class="govuk-table__cell govuk-table__cell--numeric">£75</td>
+ <td class="govuk-table__cell govuk-table__cell--numeric">£55</td>
+ </tr>
+ <tr class="govuk-table__row">
+ <td class="govuk-table__cell">March</td>
+ <td class="govuk-table__cell govuk-table__cell--numeric">£165</td>
+ <td class="govuk-table__cell govuk-table__cell--numeric">£125</td>
+ </tr>
</tbody>
</table>
Action run for f120c55 |
Other changes to npm packagediff --git a/packages/govuk-frontend/dist/govuk/components/table/fixtures.json b/packages/govuk-frontend/dist/govuk/components/table/fixtures.json
index 6b9357731..d3ed05f14 100644
--- a/packages/govuk-frontend/dist/govuk/components/table/fixtures.json
+++ b/packages/govuk-frontend/dist/govuk/components/table/fixtures.json
@@ -49,7 +49,7 @@
"hidden": false,
"description": "",
"previewLayoutModifiers": [],
- "html": "<table class=\"govuk-table\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">January</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£85</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£95</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">February</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£75</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£55</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">March</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£165</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£125</td>\n </tr>\n </tbody>\n</table>"
+ "html": "<table class=\"govuk-table\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">January</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£85</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£95</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">February</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£75</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£55</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">March</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£165</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£125</td>\n </tr>\n </tbody>\n</table>"
},
{
"name": "table with head",
@@ -112,7 +112,7 @@
"hidden": false,
"description": "",
"previewLayoutModifiers": [],
- "html": "<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header\">Month you apply</th>\n <th scope=\"col\" class=\"govuk-table__header govuk-table__header--numeric\">Rate for bicycles</th>\n <th scope=\"col\" class=\"govuk-table__header govuk-table__header--numeric\">Rate for vehicles</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">January</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£85</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£95</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">February</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£75</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£55</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">March</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£165</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£125</td>\n </tr>\n </tbody>\n</table>"
+ "html": "<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header\">Month you apply</th>\n <th scope=\"col\" class=\"govuk-table__header govuk-table__header--numeric\">Rate for bicycles</th>\n <th scope=\"col\" class=\"govuk-table__header govuk-table__header--numeric\">Rate for vehicles</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">January</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£85</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£95</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">February</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£75</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£55</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">March</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£165</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£125</td>\n </tr>\n </tbody>\n</table>"
},
{
"name": "table with head and caption",
@@ -178,7 +178,7 @@
"hidden": false,
"description": "",
"previewLayoutModifiers": [],
- "html": "<table class=\"govuk-table\">\n <caption class=\"govuk-table__caption govuk-table__caption--m\">Caption 1: Months and rates</caption>\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header\">Month you apply</th>\n <th scope=\"col\" class=\"govuk-table__header govuk-table__header--numeric\">Rate for bicycles</th>\n <th scope=\"col\" class=\"govuk-table__header govuk-table__header--numeric\">Rate for vehicles</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">January</th>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£85</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£95</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">February</th>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£75</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£55</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">March</th>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£165</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£125</td>\n </tr>\n </tbody>\n</table>"
+ "html": "<table class=\"govuk-table\">\n <caption class=\"govuk-table__caption govuk-table__caption--m\">Caption 1: Months and rates</caption>\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header\">Month you apply</th>\n <th scope=\"col\" class=\"govuk-table__header govuk-table__header--numeric\">Rate for bicycles</th>\n <th scope=\"col\" class=\"govuk-table__header govuk-table__header--numeric\">Rate for vehicles</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">January</th>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£85</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£95</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">February</th>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£75</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£55</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">March</th>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£165</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£125</td>\n </tr>\n </tbody>\n</table>"
},
{
"name": "classes",
@@ -198,7 +198,7 @@
"hidden": true,
"description": "",
"previewLayoutModifiers": [],
- "html": "<table class=\"govuk-table custom-class-goes-here\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Jan</td>\n <td class=\"govuk-table__cell\">Feb</td>\n </tr>\n </tbody>\n</table>"
+ "html": "<table class=\"govuk-table custom-class-goes-here\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Jan</td>\n <td class=\"govuk-table__cell\">Feb</td>\n </tr>\n </tbody>\n</table>"
},
{
"name": "attributes",
@@ -220,7 +220,7 @@
"hidden": true,
"description": "",
"previewLayoutModifiers": [],
- "html": "<table class=\"govuk-table\" data-foo=\"bar\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Jan</td>\n <td class=\"govuk-table__cell\">Feb</td>\n </tr>\n </tbody>\n</table>"
+ "html": "<table class=\"govuk-table\" data-foo=\"bar\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Jan</td>\n <td class=\"govuk-table__cell\">Feb</td>\n </tr>\n </tbody>\n</table>"
},
{
"name": "html as text",
@@ -241,7 +241,7 @@
"hidden": true,
"description": "",
"previewLayoutModifiers": [],
- "html": "<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header\">Foo <script>hacking.do(1337)</script></th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Foo <script>hacking.do(1337)</script></td>\n </tr>\n </tbody>\n</table>"
+ "html": "<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header\">Foo <script>hacking.do(1337)</script></th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Foo <script>hacking.do(1337)</script></td>\n </tr>\n </tbody>\n</table>"
},
{
"name": "html",
@@ -262,7 +262,7 @@
"hidden": true,
"description": "",
"previewLayoutModifiers": [],
- "html": "<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header\">Foo <span>bar</span></th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Foo <span>bar</span></td>\n </tr>\n </tbody>\n</table>"
+ "html": "<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header\">Foo <span>bar</span></th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Foo <span>bar</span></td>\n </tr>\n </tbody>\n</table>"
},
{
"name": "head with classes",
@@ -287,7 +287,7 @@
"hidden": true,
"description": "",
"previewLayoutModifiers": [],
- "html": "<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header my-custom-class\">Foo</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Jan</td>\n <td class=\"govuk-table__cell\">Feb</td>\n </tr>\n </tbody>\n</table>"
+ "html": "<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header my-custom-class\">Foo</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Jan</td>\n <td class=\"govuk-table__cell\">Feb</td>\n </tr>\n </tbody>\n</table>"
},
{
"name": "head with rowspan and colspan",
@@ -313,7 +313,7 @@
"hidden": true,
"description": "",
"previewLayoutModifiers": [],
- "html": "<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header\" colspan=\"2\" rowspan=\"2\">Foo</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Jan</td>\n <td class=\"govuk-table__cell\">Feb</td>\n </tr>\n </tbody>\n</table>"
+ "html": "<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header\" colspan=\"2\" rowspan=\"2\">Foo</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Jan</td>\n <td class=\"govuk-table__cell\">Feb</td>\n </tr>\n </tbody>\n</table>"
},
{
"name": "head with attributes",
@@ -340,7 +340,7 @@
"hidden": true,
"description": "",
"previewLayoutModifiers": [],
- "html": "<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header\" data-fizz=\"buzz\">Foo</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Jan</td>\n <td class=\"govuk-table__cell\">Feb</td>\n </tr>\n </tbody>\n</table>"
+ "html": "<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header\" data-fizz=\"buzz\">Foo</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Jan</td>\n <td class=\"govuk-table__cell\">Feb</td>\n </tr>\n </tbody>\n</table>"
},
{
"name": "with firstCellIsHeader true",
@@ -391,7 +391,7 @@
"hidden": true,
"description": "",
"previewLayoutModifiers": [],
- "html": "<table class=\"govuk-table\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">January</th>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£85</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£95</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">February</th>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£75</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£55</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">March</th>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£165</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£125</td>\n </tr>\n </tbody>\n</table>"
+ "html": "<table class=\"govuk-table\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">January</th>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£85</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£95</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">February</th>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£75</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£55</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">March</th>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£165</td>\n <td class=\"govuk-table__cell govuk-table__cell--numeric\">£125</td>\n </tr>\n </tbody>\n</table>"
},
{
"name": "firstCellIsHeader with classes",
@@ -409,7 +409,7 @@
"hidden": true,
"description": "",
"previewLayoutModifiers": [],
- "html": "<table class=\"govuk-table\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header my-custom-class\">Foo</th>\n </tr>\n </tbody>\n</table>"
+ "html": "<table class=\"govuk-table\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header my-custom-class\">Foo</th>\n </tr>\n </tbody>\n</table>"
},
{
"name": "firstCellIsHeader with html",
@@ -426,7 +426,7 @@
"hidden": true,
"description": "",
"previewLayoutModifiers": [],
- "html": "<table class=\"govuk-table\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">Foo <span>bar</span></th>\n </tr>\n </tbody>\n</table>"
+ "html": "<table class=\"govuk-table\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">Foo <span>bar</span></th>\n </tr>\n </tbody>\n</table>"
},
{
"name": "firstCellIsHeader with html as text",
@@ -443,7 +443,7 @@
"hidden": true,
"description": "",
"previewLayoutModifiers": [],
- "html": "<table class=\"govuk-table\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">Foo <script>hacking.do(1337)</script></th>\n </tr>\n </tbody>\n</table>"
+ "html": "<table class=\"govuk-table\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">Foo <script>hacking.do(1337)</script></th>\n </tr>\n </tbody>\n</table>"
},
{
"name": "firstCellIsHeader with rowspan and colspan",
@@ -462,7 +462,7 @@
"hidden": true,
"description": "",
"previewLayoutModifiers": [],
- "html": "<table class=\"govuk-table\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\" colspan=\"2\" rowspan=\"2\">Foo</th>\n </tr>\n </tbody>\n</table>"
+ "html": "<table class=\"govuk-table\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\" colspan=\"2\" rowspan=\"2\">Foo</th>\n </tr>\n </tbody>\n</table>"
},
{
"name": "firstCellIsHeader with attributes",
@@ -482,7 +482,7 @@
"hidden": true,
"description": "",
"previewLayoutModifiers": [],
- "html": "<table class=\"govuk-table\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\" data-fizz=\"buzz\">Foo</th>\n </tr>\n </tbody>\n</table>"
+ "html": "<table class=\"govuk-table\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\" data-fizz=\"buzz\">Foo</th>\n </tr>\n </tbody>\n</table>"
},
{
"name": "with falsey items",
@@ -519,7 +519,7 @@
"hidden": true,
"description": "",
"previewLayoutModifiers": [],
- "html": "<table class=\"govuk-table\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">A</td>\n <td class=\"govuk-table__cell\">1</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">B</td>\n <td class=\"govuk-table__cell\">2</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">C</td>\n <td class=\"govuk-table__cell\">3</td>\n </tr>\n </tbody>\n</table>"
+ "html": "<table class=\"govuk-table\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">A</td>\n <td class=\"govuk-table__cell\">1</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">B</td>\n <td class=\"govuk-table__cell\">2</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">C</td>\n <td class=\"govuk-table__cell\">3</td>\n </tr>\n </tbody>\n</table>"
},
{
"name": "rows with classes",
@@ -536,7 +536,7 @@
"hidden": true,
"description": "",
"previewLayoutModifiers": [],
- "html": "<table class=\"govuk-table\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell my-custom-class\">Foo</td>\n </tr>\n </tbody>\n</table>"
+ "html": "<table class=\"govuk-table\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell my-custom-class\">Foo</td>\n </tr>\n </tbody>\n</table>"
},
{
"name": "rows with rowspan and colspan",
@@ -554,7 +554,7 @@
"hidden": true,
"description": "",
"previewLayoutModifiers": [],
- "html": "<table class=\"govuk-table\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\" colspan=\"2\" rowspan=\"2\">Foo</td>\n </tr>\n </tbody>\n</table>"
+ "html": "<table class=\"govuk-table\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\" colspan=\"2\" rowspan=\"2\">Foo</td>\n </tr>\n </tbody>\n</table>"
},
{
"name": "rows with attributes",
@@ -573,7 +573,7 @@
"hidden": true,
"description": "",
"previewLayoutModifiers": [],
- "html": "<table class=\"govuk-table\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\" data-fizz=\"buzz\">Foo</td>\n </tr>\n </tbody>\n</table>"
+ "html": "<table class=\"govuk-table\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\" data-fizz=\"buzz\">Foo</td>\n </tr>\n </tbody>\n</table>"
}
]
}
Action run for f120c55 |
colinrotherham
force-pushed
the
nunjucks-formatting-table
branch
from
February 8, 2024 20:30
65a48ab
to
f120c55
Compare
govuk-design-system-ci
temporarily deployed
to
govuk-frontend-pr-4717
February 8, 2024 20:30
Inactive
romaricpascal
approved these changes
Feb 13, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Diff looks neat! ⛵
owenatgov
pushed a commit
that referenced
this pull request
Apr 4, 2024
Fix Nunjucks HTML indentation: Table
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Table changes, split out from #4448 to partially resolve #3211