mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
replace tables whose role is not presentation with divs for newsletters
This commit is contained in:
parent
9b92a64232
commit
1563ef9131
3 changed files with 1715 additions and 1714 deletions
|
|
@ -918,8 +918,8 @@ Readability.prototype = {
|
|||
}
|
||||
});
|
||||
|
||||
// replace tables of article content with divs for newsletters
|
||||
this._keepTables && this._replaceNodeTags(this._getAllNodesWithTag(articleContent, ["table"]), "div");
|
||||
// replace tables whose role is not presentation with divs for newsletters
|
||||
this._keepTables && this._replaceNodeTags(this._getAllNodesWithTag(articleContent, ["table"]).filter(t => t.getAttribute("role") !== "presentation"), "div");
|
||||
|
||||
// Final clean up of nodes that might pass readability conditions but still contain redundant text
|
||||
// For example, this article (https://www.sciencedirect.com/science/article/abs/pii/S0047248498902196)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue