Skip to content

Commit

Permalink
Update example in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Oct 31, 2022
1 parent be99fee commit 369616b
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,12 @@ import {read} from 'to-vfile'
import {rehype} from 'rehype'
import rehypeSlug from 'rehype-slug'

main()
const file = await rehype()
.data('settings', {fragment: true})
.use(rehypeSlug)
.process(await read('example.html'))

async function main() {
const file = await rehype()
.data('settings', {fragment: true})
.use(rehypeSlug)
.process(await read('example.html'))

console.log(String(file))
}
console.log(String(file))
```

Now, running `node example.js` yields:
Expand Down Expand Up @@ -132,7 +128,7 @@ Prefix to add in front of `id`s (`string`, default: `''`).
## Types

This package is fully typed with [TypeScript][].
There are no extra exported types.
It exports the additional type `Options`.

## Compatibility

Expand Down

0 comments on commit 369616b

Please sign in to comment.