diff options
| author | Michael Williamson <mike@zwobble.org> | 2025-06-08 14:06:14 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2025-06-08 14:06:14 +0100 |
| commit | 18a232fac243245a2b91f0dbba163c62c5b9cd2e (patch) | |
| tree | f26137d1cb7f14cca6c42256ffb383f62c733482 /lib | |
| parent | ee76b524a54ff235416458abb8b17bedcb478eb8 (diff) | |
Ignore deleted table rows
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/docx/body-reader.js | 6 |
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}); |
