* include more ancestors in candidate scoring
* fix medium-3 testcase
The original source file contained two copies of the document, which
was causing incorrect results
* remove unnecessary nested elements
* fix removal of empty elements
* add option to regenerate all testcases
* update tests
* fix quanta testcase
* fix creating testcase from network
* fix early exit in testcase generation
* format HTML before comparing while testing
* upgrade js-beautify
* don't merge outer readability div
* Initial work on preparing Readability for npm
* Adjust some require()s
* Point package.json to index.js
* Add Node.js instructions to README
* Use ES6 in eslint
This provides a descriptive error message if no document is passed, and
ignores the first argument if the second argument looks like
a reasonable DOM document instance.
This change ups the required node version to 7.0 because it relies on the builtin url module.
We now pass a url when constructing a jsdom document or JSDOMParser document.
Because this is an API change, I'm increasing the package version.
Ultimately, I would like to remove the argument from the readability constructor. It should
use the documentURI from the document it is passed.
For instance, jsdom's more spec-compliant parsing causes issues with auto-closing elements (lifehacker article) and with not having self-closing <img> and <br> tags. The former was fixed by removing offending markup, the latter by adjusting JSDOMParser to be more sane, and the expected outputs to cope with this.
Finally, JSDOMParser automatically drops comments. The test code needed to manually do this in the jsdom case.