Skip to content

Commit

Permalink
add regex snipping documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
axfelix committed Aug 7, 2024
1 parent 743a706 commit 5315aec
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,15 @@ That means that if selectedLines is used, the line numbers to highlight are rela

If you use Docusuarus, you just need to add some additional CSS: https://docusaurus.io/docs/markdown-features/code-blocks#line-highlighting

**Regex snipping**

Instead of specifying a set of line numbers to snip, you can use regular expression patterns to mark the start and end of a snip.
Specify a `startPattern` and an `endPattern`:

```
<!--SNIPSTART hellouniverse {"startPattern" : "const \\{ greet", "endPattern": "\\}\\)"} -->
```

## Run

From the root directory of your project run the following command:
Expand Down

0 comments on commit 5315aec

Please sign in to comment.