From d9c59a13e360ef3f1d2f540ea2f6924b74d029a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Sat, 26 Aug 2023 12:08:34 +0200 Subject: [PATCH] highlight: fix rendering for Hugo < 0.111 #630 --- exampleSite/content/basics/migration/_index.en.md | 2 ++ layouts/partials/shortcodes/highlight.html | 1 + 2 files changed, 3 insertions(+) diff --git a/exampleSite/content/basics/migration/_index.en.md b/exampleSite/content/basics/migration/_index.en.md index dcb62aa34a..17793fe4f2 100644 --- a/exampleSite/content/basics/migration/_index.en.md +++ b/exampleSite/content/basics/migration/_index.en.md @@ -45,6 +45,8 @@ This document shows you what's new in the latest release. For a detailed list of - {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} This release fixes a long outstanding bug where Mermaid graphs could not be displayed if they were initially hidden - like in collapsed `expand` or inactive `tabs`. +- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Restored compatibility with Hugo versions lower than {{% badge color="fuchsia" icon="fab fa-hackerrank" title=" " %}}0.111.0{{% /badge %}} for the [`highlight` shortcode]({{% relref "shortcodes/highlight" %}}). This does not change the minimum required Hugo version. + --- ## 5.19.0 (2023-08-12) {#5190} diff --git a/layouts/partials/shortcodes/highlight.html b/layouts/partials/shortcodes/highlight.html index a6f558bc8d..bb7e48b74a 100644 --- a/layouts/partials/shortcodes/highlight.html +++ b/layouts/partials/shortcodes/highlight.html @@ -11,6 +11,7 @@ {{- $type := "" }} {{- range $k, $v := . }} {{- if eq $k "context" }} + {{- else if eq $k "page" }} {{- else if eq $k "attributes" }} {{- $attributes = $v }} {{- else if eq $k "content" }}