code highlighting (#19345)

* code highlighting

* Update content/contribute/components/code-blocks.md

Co-authored-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>

---------

Co-authored-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
Allie Sadler 2024-02-08 10:57:03 +00:00 committed by GitHub
parent 287cfd605e
commit 0b722c9aee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 30 additions and 0 deletions

View File

@ -20,6 +20,36 @@ export name=<MY_NAME>
This syntax is reserved for variable names, and will cause the variable to
be rendered in a special color and font style.
## Highlight lines
```text {hl_lines=[7,8]}
incoming := map[string]interface{}{
"asdf": 1,
"qwer": []interface{}{},
"zxcv": []interface{}{
map[string]interface{}{},
true,
int(1e9),
"tyui",
},
}
```
````markdown
```go {hl_lines=[7,8]}
incoming := map[string]interface{}{
"asdf": 1,
"qwer": []interface{}{},
"zxcv": []interface{}{
map[string]interface{}{},
true,
int(1e9),
"tyui",
},
}
```
````
## Bash
Use the `bash` language code block when you want to show a Bash script: