From c16788f9919a050d1dc7c4d63a4053a77413682b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= <76261501+zecakeh@users.noreply.github.com> Date: Thu, 21 Nov 2024 00:21:25 +0100 Subject: [PATCH] Remove trailing slash on void HTML elements (#2009) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to the W3C's HTML validator, trailing slashes in void-element have no effect, and might interact badly in some cases. Signed-off-by: Kévin Commaille --- changelogs/internal/newsfragments/2009.clarification | 1 + layouts/partials/events/render-event.html | 2 +- layouts/partials/favicons.html | 4 ++-- layouts/partials/openapi/render-operation.html | 6 +++--- layouts/shortcodes/changelog/changelogs.html | 2 +- layouts/shortcodes/definition.html | 2 +- layouts/shortcodes/diagram.html | 4 ++-- layouts/shortcodes/event-fields.html | 2 +- 8 files changed, 12 insertions(+), 11 deletions(-) create mode 100644 changelogs/internal/newsfragments/2009.clarification diff --git a/changelogs/internal/newsfragments/2009.clarification b/changelogs/internal/newsfragments/2009.clarification new file mode 100644 index 000000000..eed0f4770 --- /dev/null +++ b/changelogs/internal/newsfragments/2009.clarification @@ -0,0 +1 @@ +Remove trailing slash on void HTML elements. diff --git a/layouts/partials/events/render-event.html b/layouts/partials/events/render-event.html index 154e51bf3..eb72ee20d 100644 --- a/layouts/partials/events/render-event.html +++ b/layouts/partials/events/render-event.html @@ -27,7 +27,7 @@

-
+
{{ if (index $event_data "x-addedInMatrixVersion") }} {{ partial "added-in" (dict "v" (index $event_data "x-addedInMatrixVersion")) }} diff --git a/layouts/partials/favicons.html b/layouts/partials/favicons.html index d38f12ef9..59ba18302 100644 --- a/layouts/partials/favicons.html +++ b/layouts/partials/favicons.html @@ -7,5 +7,5 @@ {{- $ico := resources.Get "icons/favicon.ico" -}} {{- $svg := resources.Get "icons/favicon.svg" -}} - - + + diff --git a/layouts/partials/openapi/render-operation.html b/layouts/partials/openapi/render-operation.html index 614e37a15..36e010f6f 100644 --- a/layouts/partials/openapi/render-operation.html +++ b/layouts/partials/openapi/render-operation.html @@ -40,7 +40,7 @@

-
+
{{ if $operation_data.deprecated }} {{ partial "alert" (dict "type" "warning" "omit_title" "true" "content" "This API is deprecated and will be removed from a future release.") }} @@ -84,9 +84,9 @@

-
+
{{ partial "openapi/render-request" (dict "parameters" $operation_data.parameters "request_body" $operation_data.requestBody "anchor_base" $anchor ) }} -
+
{{ partial "openapi/render-responses" (dict "responses" $operation_data.responses "anchor_base" $anchor ) }} diff --git a/layouts/shortcodes/changelog/changelogs.html b/layouts/shortcodes/changelog/changelogs.html index 96a828602..d6c0add88 100644 --- a/layouts/shortcodes/changelog/changelogs.html +++ b/layouts/shortcodes/changelog/changelogs.html @@ -4,5 +4,5 @@ */}} {{ with index .Page.RegularPages.ByDate.Reverse 0 }} - + {{ end }} diff --git a/layouts/shortcodes/definition.html b/layouts/shortcodes/definition.html index f5d50e758..10ad0e87f 100644 --- a/layouts/shortcodes/definition.html +++ b/layouts/shortcodes/definition.html @@ -39,7 +39,7 @@

-
+
{{ if (index $definition "x-addedInMatrixVersion") }} {{ partial "added-in" (dict "v" (index $definition "x-addedInMatrixVersion")) }} diff --git a/layouts/shortcodes/diagram.html b/layouts/shortcodes/diagram.html index 035dbdf1f..5e2dadd3e 100644 --- a/layouts/shortcodes/diagram.html +++ b/layouts/shortcodes/diagram.html @@ -45,8 +45,8 @@ {{- $fallback := $highRes.Resize (printf "%sx png" $width) -}} - - {{ $alt }} + + {{ $alt }} {{- else -}} {{- errorf "diagram %s not found" $path -}} diff --git a/layouts/shortcodes/event-fields.html b/layouts/shortcodes/event-fields.html index e06d77eee..35085996e 100644 --- a/layouts/shortcodes/event-fields.html +++ b/layouts/shortcodes/event-fields.html @@ -28,7 +28,7 @@

-
+
{{ $event.description | markdownify }}