aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2025-06-08 14:06:14 +0100
committerMichael Williamson <mike@zwobble.org>2025-06-08 14:06:14 +0100
commit18a232fac243245a2b91f0dbba163c62c5b9cd2e (patch)
treef26137d1cb7f14cca6c42256ffb383f62c733482 /lib
parentee76b524a54ff235416458abb8b17bedcb478eb8 (diff)
Ignore deleted table rows
Diffstat (limited to 'lib')
-rw-r--r--lib/docx/body-reader.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/docx/body-reader.js b/lib/docx/body-reader.js
index 2ab5ba7..ad2dd53 100644
--- a/lib/docx/body-reader.js
+++ b/lib/docx/body-reader.js
@@ -480,6 +480,12 @@ function BodyReader(options) {
function readTableRow(element) {
var properties = element.firstOrEmpty("w:trPr");
+
+ var isDeleted = !!properties.first("w:del");
+ if (isDeleted) {
+ return emptyResult();
+ }
+
var isHeader = !!properties.first("w:tblHeader");
return readXmlElements(element.children).map(function(children) {
return documents.TableRow(children, {isHeader: isHeader});