From 0b722c9aee485b05638485158aa7d54ebbe5e501 Mon Sep 17 00:00:00 2001 From: Allie Sadler <102604716+aevesdocker@users.noreply.github.com> Date: Thu, 8 Feb 2024 10:57:03 +0000 Subject: [PATCH] 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> --- content/contribute/components/code-blocks.md | 30 ++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/content/contribute/components/code-blocks.md b/content/contribute/components/code-blocks.md index 8a1abdccc0..46d8833d38 100644 --- a/content/contribute/components/code-blocks.md +++ b/content/contribute/components/code-blocks.md @@ -20,6 +20,36 @@ export 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: