From 3a2c03ee9f79ee6a25f63fee79f2010b9623d74e Mon Sep 17 00:00:00 2001 From: Justin Walters Date: Mon, 15 Jul 2019 17:12:21 -0400 Subject: [PATCH 1/2] Only target direct children of the tr --- index.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 982c9c7..e13d76c 100644 --- a/index.js +++ b/index.js @@ -20,7 +20,7 @@ module.exports = function($) { $("tr", this).each(function(row_idx, row) { curr_y = 0; - $("td, th", row).each(function(col_idx, col) { + $("> td, > th", row).each(function(col_idx, col) { var rowspan = $(col).attr('rowspan') || 1; var colspan = $(col).attr('colspan') || 1; if (textMode === true) { diff --git a/package.json b/package.json index 1bacc5b..7d4a56c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cheerio-tableparser", - "version": "1.0.1", + "version": "1.0.2", "description": "The tables parser plugin for cheerio", "main": "index.js", "keywords": [ From 22c796852249b78b70e785cabd38ac8d279936de Mon Sep 17 00:00:00 2001 From: Justin Walters Date: Tue, 20 Aug 2019 11:00:58 -0400 Subject: [PATCH 2/2] Don't change version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7d4a56c..1bacc5b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cheerio-tableparser", - "version": "1.0.2", + "version": "1.0.1", "description": "The tables parser plugin for cheerio", "main": "index.js", "keywords": [