From 4e743ec36055b87339e6c7f2e89d5534533b712d Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Thu, 6 Jul 2023 07:01:26 -0700 Subject: [PATCH] Improve highlight function example --- content/en/functions/highlight.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/functions/highlight.md b/content/en/functions/highlight.md index 2ca125467..1a47fe37f 100644 --- a/content/en/functions/highlight.md +++ b/content/en/functions/highlight.md @@ -91,8 +91,8 @@ Instead of specifying both `lineNos` and `lineNumbersInTable`, you can use the f {{ $input := `echo "Hello World!"` }} {{ $lang := "bash" }} -{{ $options := slice "lineNos=table" "style=dracula" }} -{{ transform.Highlight $input $lang (delimit $options ",") }} +{{ $options := dict "lineNos" "table" "style" "dracula" }} +{{ transform.Highlight $input $lang $options }} ``` [Chroma]: https://github.com/alecthomas/chroma