Skip to content

Commit

Permalink
docs: Explain how to get an instance of Slugger (#2750)
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelgrimm committed Mar 7, 2023
1 parent f12568e commit 6164fb6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/USING_PRO.md
Expand Up @@ -128,6 +128,13 @@ console.log(marked.parse('# heading+'));
- <code>**image**(*string* href, *string* title, *string* text)</code>
- <code>**text**(*string* text)</code>

`Slugger` is exposed from marked as `marked.Slugger`:

```js
import { marked } from 'marked'
const slugger = new marked.Slugger()
```

`slugger` has the `slug` method to create a unique id from value:

```js
Expand Down

1 comment on commit 6164fb6

@vercel
Copy link

@vercel vercel bot commented on 6164fb6 Mar 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.