File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -269,7 +269,7 @@ Change `index.js` like so:
269
269
import diff from 'virtual-dom/diff.js'
270
270
import patch from 'virtual-dom/patch.js'
271
271
+ import {unified} from 'unified'
272
- + import retextEnglish from 'retext-english'
272
+ + import retextEnglish, {Parser} from 'retext-english'
273
273
274
274
+ const processor = unified().use(retextEnglish)
275
275
const root = document.querySelector('#root')
@@ -281,7 +281,7 @@ Change `index.js` like so:
281
281
282
282
- function parse() {}
283
283
+ function parse(value) {
284
- + return processor.runSync(processor .parse(value))
284
+ + return processor.runSync(new Parser() .parse(value))
285
285
+ }
286
286
287
287
function highlight() {}
304
304
--- a/index.js
305
305
+++ b/index.js
306
306
@@ -32,5 +32,19 @@ function render(text) {
307
- return processor.runSync(processor .parse(value))
307
+ return processor.runSync(new Parser() .parse(value))
308
308
}
309
309
310
310
- function highlight() {}
You can’t perform that action at this time.
0 commit comments