Closed Trott closed 2 years ago
(Hooray! CI is green. Obviously, this obsoletes the other two open pull requests that updated marked but didn't update the code to accommodate one of the breaking changes in marked 4.0.0.)
Hello @Trott I tried the same thing and the test failed. I had to change line 40 to
const str = marked.parse(data.contents.toString(), options)
and line 44 to
data[key] = marked.parse(data[key].toString(), options)
E.g. changed marked(...)
to marked.parse(...)
And then the test passed... test with Node v16.13.0
Hello @Trott I tried the same thing and the test failed. I had to change line 40 to
const str = marked.parse(data.contents.toString(), options)
and line 44 todata[key] = marked.parse(data[key].toString(), options)
E.g. changed
marked(...)
tomarked.parse(...)
And then the test passed... test with Node v16.13.0
That's because you left out the curly braces in the require statement. Make sure it's this:
const { marked } = require('marked')
...and not this:
const marked = require('marked')
...and you won't need to make those other changes.
Arg, thanks for responding and setting me straight 😕
Thx @Trott tested locally on all supported versions, will release this soon
I tested this on Node.js 8 and Node.js 16 and the tests passed for both.