From d73d4a22fb675f12bc2b7a73909208b84e6e9cc5 Mon Sep 17 00:00:00 2001 From: Hugues Morisset Date: Sun, 11 Aug 2024 17:34:52 +0200 Subject: [PATCH] Doc --- .../documentation/content/syntax-highlighting.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/content/documentation/content/syntax-highlighting.md b/docs/content/documentation/content/syntax-highlighting.md index e84eb16539..3314e63013 100644 --- a/docs/content/documentation/content/syntax-highlighting.md +++ b/docs/content/documentation/content/syntax-highlighting.md @@ -302,7 +302,7 @@ highlight(code); - `hide_lines` to hide lines. You must specify a list of inclusive ranges of lines to hide, separated by ` ` (whitespace). Ranges are 1-indexed. - + ```` ```rust,hide_lines=1-2 use highlighter::highlight; @@ -311,6 +311,16 @@ highlight(code); ``` ```` +- `path` to specify a path the code block is associated with. + +```` +```rust,path=mod.rs +use highlighter::highlight; +let code = "..."; +highlight(code); +``` +```` + ## Styling codeblocks Depending on the annotations used, some codeblocks will be hard to read without any CSS. We recommend using the following