From 520acbbf6fe3ef43e9b2b662bfb21e0f9c3bb982 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Wed, 29 May 2024 13:04:03 -0700 Subject: [PATCH] docs: inline code syntax highlighting (closes #1162) --- docs/features/syntax highlighting.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/features/syntax highlighting.md b/docs/features/syntax highlighting.md index 16fef257..bf9baaee 100644 --- a/docs/features/syntax highlighting.md +++ b/docs/features/syntax highlighting.md @@ -95,6 +95,16 @@ const [age, setAge] = useState(50) const [name, setName] = useState("Taylor") ``` +### Inline Highlighting + +Append {:lang} to the end of inline code to highlight it like a regular code block. + +``` +This is an array `[1, 2, 3]{:js}` of numbers 1 through 3. +``` + +This is an array `[1, 2, 3]{:js}` of numbers 1 through 3. + ### Line numbers Syntax highlighting has line numbers configured automatically. If you want to start line numbers at a specific number, useĀ `showLineNumbers{number}`: