Skip to content

Commit 90ad33e

Browse files
committed
Update example in readme.md
1 parent b0abd88 commit 90ad33e

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

readme.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@ npm install unist-util-remove-position
1313
## Usage
1414

1515
```javascript
16-
var inspect = require('util').inspect;
1716
var remark = require('remark');
18-
var removePosition = require('./');
17+
var removePosition = require('unist-util-remove-position');
1918

20-
var tree = remark().parse('Some **importance**, _emphasis_, and `code`.');
19+
var tree = remark().parse('Some _emphasis_, **importance**, and `code`.');
2120

22-
console.log(inspect(removePosition(tree, true), {depth: null}));
21+
console.dir(removePosition(tree, true), {depth: null});
2322
```
2423

2524
Yields:
@@ -30,11 +29,11 @@ Yields:
3029
[ { type: 'paragraph',
3130
children:
3231
[ { type: 'text', value: 'Some ' },
33-
{ type: 'strong',
34-
children: [ { type: 'text', value: 'importance' } ] },
35-
{ type: 'text', value: ', ' },
3632
{ type: 'emphasis',
3733
children: [ { type: 'text', value: 'emphasis' } ] },
34+
{ type: 'text', value: ', ' },
35+
{ type: 'strong',
36+
children: [ { type: 'text', value: 'importance' } ] },
3837
{ type: 'text', value: ', and ' },
3938
{ type: 'inlineCode', value: 'code' },
4039
{ type: 'text', value: '.' } ] } ] }

0 commit comments

Comments
 (0)