From 03ca7be5b88aea08223929b92aef248d05888956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Mon, 30 May 2022 20:42:46 +0200 Subject: [PATCH] Fix indentation in highlight shortcode This commit adds a new `.InnerDeindent` method to the shortcode context, which is `.Inner` with any indendation removed. This is then used in the built-in `highlight` shortcode to prevent the extra whitespace getting hightlighted. Fixes #4717 --- content/en/variables/shortcodes.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/en/variables/shortcodes.md b/content/en/variables/shortcodes.md index 14eb2aca2..37ae30629 100644 --- a/content/en/variables/shortcodes.md +++ b/content/en/variables/shortcodes.md @@ -45,4 +45,8 @@ toc: false [markdownshortcode]: /content-management/shortcodes/#shortcodes-with-markdown [shortcodes]: /templates/shortcode-templates/ +.InnerDeindent {{< new-in "0.100.0" >}} +: Gets the `.Inner` with any indentation removed. This is what's used in the built-in `{{}}` shortcode. + +