dbashford/textract

Issue with cheerio 0.19.0

jbilcke opened this issue · 1 comments

Hi,

There is an issue when parsing markdown: content gets translated to HTML,
but Cheerio then fails to parse it:

  ...
  text = "<textractwrapper>" + text + "<textractwrapper>";
  try {
    $ = cheerio.load( text );
    $('script').remove(); // <<< this line crashes with message:   TypeError: Cannot read property 'children' of undefined
  ...

This is caused by a regression in cheerio 0.19.0:

cheeriojs/cheerio#804

I would advise to upgrade to cheerio 0.20.0, which works fine

Closed by PR