@@ -13,13 +13,12 @@ npm install unist-util-remove-position
1313## Usage
1414
1515``` javascript
16- var inspect = require (' util' ).inspect ;
1716var 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
2524Yields:
@@ -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