Skip to content

Commit

Permalink
Simplify example in readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jun 20, 2017
1 parent fc77ec4 commit eb11845
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ Say we have the following file, `fragment.html`:
And our script, `example.js`, looks as follows:

```javascript
var vfile = require('to-vfile');
var fs = require('fs');
var rehype = require('rehype');
var slug = require('rehype-slug');

rehype()
.data('settings', {fragment: true})
.use(slug)
.process(vfile.readSync('fragment.html'), function (err, file) {
.process(fs.readFileSync('fragment.html'), function (err, file) {
if (err) throw err;
console.log(String(file));
});
Expand Down

0 comments on commit eb11845

Please sign in to comment.