Improve highlight function example

This commit is contained in:
Joe Mooring 2023-07-06 07:01:26 -07:00 committed by GitHub
parent f96fa68053
commit 4e743ec360
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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