@@ -13,13 +13,12 @@ npm install unist-util-remove-position
13
13
## Usage
14
14
15
15
``` javascript
16
- var inspect = require (' util' ).inspect ;
17
16
var remark = require (' remark' );
18
- var removePosition = require (' ./ ' );
17
+ var removePosition = require (' unist-util-remove-position ' );
19
18
20
- var tree = remark ().parse (' Some **importance**, _emphasis_ , and `code`.' );
19
+ var tree = remark ().parse (' Some _emphasis_, **importance**, and `code`.' );
21
20
22
- console .log ( inspect ( removePosition (tree, true ), {depth: null }) );
21
+ console .dir ( removePosition (tree, true ), {depth: null });
23
22
```
24
23
25
24
Yields:
@@ -30,11 +29,11 @@ Yields:
30
29
[ { type: ' paragraph' ,
31
30
children:
32
31
[ { type: ' text' , value: ' Some ' },
33
- { type: ' strong' ,
34
- children: [ { type: ' text' , value: ' importance' } ] },
35
- { type: ' text' , value: ' , ' },
36
32
{ type: ' emphasis' ,
37
33
children: [ { type: ' text' , value: ' emphasis' } ] },
34
+ { type: ' text' , value: ' , ' },
35
+ { type: ' strong' ,
36
+ children: [ { type: ' text' , value: ' importance' } ] },
38
37
{ type: ' text' , value: ' , and ' },
39
38
{ type: ' inlineCode' , value: ' code' },
40
39
{ type: ' text' , value: ' .' } ] } ] }
0 commit comments