docs: fix docs for usage of regions in snippets (#421)

pull/716/head
0x009922 3 years ago committed by GitHub
parent 78a2e84e7b
commit 31c863d14c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -364,12 +364,12 @@ It also supports [line highlighting](#line-highlighting-in-code-blocks):
The value of `@` corresponds to the source root. By default it's the VitePress project root, unless `srcDir` is configured.
:::
You can also use a [VS Code region](https://code.visualstudio.com/docs/editor/codebasics#_folding) to only include the corresponding part of the code file. You can provide a custom region name after a `#` following the filepath (`snippet` by default):
You can also use a [VS Code region](https://code.visualstudio.com/docs/editor/codebasics#_folding) to only include the corresponding part of the code file. You can provide a custom region name after a `#` following the filepath:
**Input**
```md
<<< @/snippets/snippet-with-region.js{1}
<<< @/snippets/snippet-with-region.js#snippet{1}
```
**Code file**

Loading…
Cancel
Save