mirror of https://github.com/docker/docs.git
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:
parent
287cfd605e
commit
0b722c9aee
|
@ -20,6 +20,36 @@ export name=<MY_NAME>
|
||||||
This syntax is reserved for variable names, and will cause the variable to
|
This syntax is reserved for variable names, and will cause the variable to
|
||||||
be rendered in a special color and font style.
|
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
|
## Bash
|
||||||
|
|
||||||
Use the `bash` language code block when you want to show a Bash script:
|
Use the `bash` language code block when you want to show a Bash script:
|
||||||
|
|
Loading…
Reference in New Issue