Skip to content

Commit

Permalink
Update example to use top-level await
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jul 13, 2022
1 parent e89c88b commit ca62b86
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,12 @@ import {remark} from 'remark'
import remarkGfm from 'remark-gfm'
import remarkGithub from 'remark-github'

main()
const file = await remark()
.use(remarkGfm)
.use(remarkGithub)
.process(await read('example.md'))

async function main() {
const file = await remark()
.use(remarkGfm)
.use(remarkGithub)
.process(await read('example.md'))

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

Now, running `node example` yields:
Expand Down

0 comments on commit ca62b86

Please sign in to comment.