From 5c1486ab85e6d06a595aa26bfbe31c606d5eb42e Mon Sep 17 00:00:00 2001 From: Krzysztof Trzeciak Date: Wed, 30 Nov 2016 11:38:52 +0100 Subject: [PATCH] treat thead as row, too When ignoring `thead` elements, the table header is not returned in parsed result. Example of such tables: http://www.espn.com/nba/standings --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 982c9c7..fbd0c60 100644 --- a/index.js +++ b/index.js @@ -18,7 +18,7 @@ module.exports = function($) { curr_x = 0, curr_y = 0; - $("tr", this).each(function(row_idx, row) { + $("tr, thead", this).each(function(row_idx, row) { curr_y = 0; $("td, th", row).each(function(col_idx, col) { var rowspan = $(col).attr('rowspan') || 1;