Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-05-30 21:42:46 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-05-31 10:05:54 +0300
commit6f7bf3f2d7eda178d0dba4a6bf3dfa50229df7ae (patch)
tree781580c54bed6942f1844def43750b027d8bbc76 /docs
parent9e904d756be02ca30e4cd9abb1eae8ba01f9c8af (diff)
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
Diffstat (limited to 'docs')
-rw-r--r--docs/content/en/variables/shortcodes.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/content/en/variables/shortcodes.md b/docs/content/en/variables/shortcodes.md
index 14eb2aca2..37ae30629 100644
--- a/docs/content/en/variables/shortcodes.md
+++ b/docs/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 `{{</* highlight */>}}` shortcode.
+
+