From 609539c31407a750fb0a01069808edbaf1d13a68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Wed, 13 Dec 2023 22:42:59 +0100 Subject: [PATCH] highlight: fix codefence syntax in Hugo >= 0.121.0 #749 --- exampleSite/content/basics/migration/_index.en.md | 2 ++ layouts/partials/shortcodes/highlight.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/exampleSite/content/basics/migration/_index.en.md b/exampleSite/content/basics/migration/_index.en.md index d81d4b7d39..7f115590ea 100644 --- a/exampleSite/content/basics/migration/_index.en.md +++ b/exampleSite/content/basics/migration/_index.en.md @@ -40,6 +40,8 @@ This document shows you what's new in the latest release and flags it with one o - {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} The themes [config](basics/configuration) and [frontmatter](cont/frontmatter) options received a comprehensive documentation update. In addition the theme switched from `config.toml` to `hugo.toml`. +- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Restored compatibility with Hugo versions {{% badge color="fuchsia" icon="fab fa-hackerrank" title=" " %}}0.121.0{{% /badge %}} or higher for the [`highlight` shortcode](shortcodes/highlight). This does not change the minimum required Hugo version. + --- ## 5.23.0 (2023-11-03) {#5230} diff --git a/layouts/partials/shortcodes/highlight.html b/layouts/partials/shortcodes/highlight.html index 8950aa53cd..bc47481487 100644 --- a/layouts/partials/shortcodes/highlight.html +++ b/layouts/partials/shortcodes/highlight.html @@ -59,7 +59,7 @@ {{- end }} {{- $params := slice }} {{- range $k, $v := $options }} - {{- $params = $params | append (printf "%s=%s" $k $v) }} + {{- $params = $params | append (printf "%s=%s" $k (string $v)) }} {{- end }} {{- $params = delimit $params ", " }} {{- $title := "" }}