Commit Graph

12 Commits (3844d8f05b3f114e3df16c3bc3caf44e5ba52181)

Author SHA1 Message Date
PalmerAL 3844d8f05b
Include more ancestors in candidate scoring (#611)
* 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
4 years ago
David A Roberts 9f2c5cb42e Put phrasing content into paragraphs
This removes the need for `p.readability-styled` elements.
6 years ago
Gijs Kruitbosch ad4dd26448 Update test expectations 7 years ago
Cameron McCormack 5ad448f831 Update test expectations. 7 years ago
Evan Tseng c7c26382b9 Bug 1217007 - Remove nodes without any content, r=Gijs 7 years ago
Evan Tseng 19f2124c82 Bug 1259763 - Remove h2 when there is only one h2 and its text content substantially equals article title, r=Gijs 7 years ago
Gijs Kruitbosch 2e1cb3f467 Fix issue #251 by making JSDOMParser expect XML and stop making excuses for 'self-closed' things, when all that does is cause trouble 8 years ago
Margaret Leibovic 319a50b4f0 Fixes #184 - Don't strip class names from article content 9 years ago
Nicolas Perriault de89036cd5 Fixes #130 - Using js-beautify for HTML formatting. 9 years ago
Nicolas Perriault 6eeabf90c1 Fixes #164 - Add support for title alt semantic metadata. 9 years ago
Gijs Kruitbosch b1f6c62b25 Fix tests for readability to also work with jsdom
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.
9 years ago
Gijs Kruitbosch 5efddf6620 Update all the tests, add a bunch of random things so we have some base idea of what stuff we're breaking when changing things. 9 years ago