luin/node-readability — pull request #9 by editor (2013-09-18 02:27:33+00:00)
Title: version bump & last resort fix for luin/node-readability#8

I experienced some errors with the same type of origin as discussed and resolved in https://github.com/luin/node-readability/issues/8

/Users/account/Code/testapp/node_modules/node-readability/src/helpers.js:203
topCandidate.innerHTML = document.body.innerHTML;
^
TypeError: Cannot read property 'innerHTML' of null
at Object.module.exports.grabArticle (/Users/account/Code/testapp/node_modules/node-readability/src/helpers.js:203:43)
at /Users/account/Code/read/index.js:5:14
at /Users/account/Code/read/node_modules/jsdom/lib/jsdom.js:252:9
at process._tickCallback (node.js:415:13)

`jsdom` apparently doesn't a allow you to create a new `BODY` tag so there seems no resort but to return an Error when no body tag exists.

Added a test to check for this.

$ /usr/local/share/npm/bin/mocha test/readability.test.js

node-readability
✓ should get document (2152ms)
✓ should get document with frames (3177ms)
✓ should handle the html that missing body tag
✓ should let helpers.grabArticle handle html that's missing a body tag

4 passing (5s)