mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-12 16:24:39 -04:00
Improve highlight function example
This commit is contained in:
parent
f96fa68053
commit
4e743ec360
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user