From 9bb0ecc9d4789dc4940e162af38a7911360a18e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Thu, 20 Jun 2024 05:00:38 +0200 Subject: [PATCH] Avoid nesting p HTML elements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A p HTML element cannot contain other block elements, so the "parent" element is closed when the first "child" one is opened. We need to use Page.RenderString with options to force Hugo to keep the wrapping p elements even if the content contains a single paragraph. Signed-off-by: Kévin Commaille --- layouts/partials/openapi/render-operation.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/openapi/render-operation.html b/layouts/partials/openapi/render-operation.html index 8c6fce0e..ef525353 100644 --- a/layouts/partials/openapi/render-operation.html +++ b/layouts/partials/openapi/render-operation.html @@ -46,7 +46,7 @@ {{ partial "changed-in" (dict "changes_dict" (index $operation_data "x-changedInMatrixVersion")) }} {{ end -}} -

{{ $operation_data.description | markdownify }}

+{{ $operation_data.description | page.RenderString (dict "display" "block") }}