File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -34,22 +34,22 @@ Say we have the following `example.html`:
34
34
…and next to it, ` example.js ` :
35
35
36
36
``` js
37
- var unified = require ( ' unified' )
38
- var parse = require ( ' rehype-parse' )
39
- var stringify = require ( ' remark-stringify' )
40
- var vfile = require ( ' to-vfile' )
41
- var toMdast = require ( ' hast-util-to-mdast' )
37
+ import unified from ' unified'
38
+ import remarkParse from ' rehype-parse'
39
+ import remarkStringify from ' remark-stringify'
40
+ import vfile from ' to-vfile'
41
+ import { toMdast } from ' hast-util-to-mdast'
42
42
43
43
var file = vfile .readSync (' example.html' )
44
44
45
45
var hast = unified ()
46
- .use (parse )
46
+ .use (remarkParse )
47
47
.parse (file)
48
48
49
49
var mdast = toMdast (hast)
50
50
51
51
var doc = unified ()
52
- .use (stringify )
52
+ .use (remarkStringify )
53
53
.stringify (mdast)
54
54
55
55
console .log (doc)
You can’t perform that action at this time.
0 commit comments