Skip to content

Commit

Permalink
Fix table header missing (mozilla#530)
Browse files Browse the repository at this point in the history
  • Loading branch information
RadhiFadlillah authored and 1257mp committed Jul 19, 2019
1 parent e55ffab commit e1dab15
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 185 deletions.
1 change: 1 addition & 0 deletions Readability.js
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,7 @@ Readability.prototype = {
if (stripUnlikelyCandidates) {
if (this.REGEXPS.unlikelyCandidates.test(matchString) &&
!this.REGEXPS.okMaybeItsACandidate.test(matchString) &&
!this._hasAncestorTag(node, "table") &&
node.tagName !== "BODY" &&
node.tagName !== "A") {
this.log("Removing unlikely candidate - " + matchString);
Expand Down
5 changes: 3 additions & 2 deletions test/test-pages/keep-tabular-data/expected-metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"title": "Friday Facts #282 - 0.17 in sight | Factorio",
"byline": null,
"dir": null,
"excerpt": "Posted by kovarex, TOGos, Ernestas, Albert on 2019-02-15, all posts",
"readerable": true,
"siteName": "Factorio.com"
"siteName": "Factorio.com",
"readerable": true
}
Loading

0 comments on commit e1dab15

Please sign in to comment.