Skip to content

Commit

Permalink
docs: fix docs for usage of regions in snippets (#421)
Browse files Browse the repository at this point in the history
  • Loading branch information
0x009922 committed Jun 3, 2022
1 parent 78a2e84 commit 31c863d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/guide/markdown.md
Expand Up @@ -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**
Expand Down

0 comments on commit 31c863d

Please sign in to comment.