From d1573743476bb99e8b9e3aba05e51ec51ae8f95f Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 26 Sep 2026 21:39:33 +0100 Subject: Read the children of w:customXml elements --- NEWS | 2 ++ lib/docx/body-reader.js | 1 + test/docx/body-reader.tests.js | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/NEWS b/NEWS index 7142069..3a5ce10 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,8 @@ Any callers that rely on bluebird promises can convert the returned promise into a bluebird promise using bluebird.Promise.resolve(). +* Read the children of w:customXml elements. + # 1.12.3 * Avoid excessive backtracking when parsing an unterminated string with many diff --git a/lib/docx/body-reader.js b/lib/docx/body-reader.js index 8b7167f..f9ab168 100644 --- a/lib/docx/body-reader.js +++ b/lib/docx/body-reader.js @@ -443,6 +443,7 @@ function BodyReader(options) { }); }, + "w:customXml": readChildElements, "w:ins": readChildElements, "w:object": readChildElements, "w:smartTag": readChildElements, diff --git a/test/docx/body-reader.tests.js b/test/docx/body-reader.tests.js index 86f70d3..197f19d 100644 --- a/test/docx/body-reader.tests.js +++ b/test/docx/body-reader.tests.js @@ -1750,6 +1750,10 @@ test("can read pictures with hyperlink specified in document properties", functi ))); }); +test("children of w:customXml are converted normally", function() { + assertChildrenAreConvertedNormally("w:customXml"); +}); + test("children of w:ins are converted normally", function() { assertChildrenAreConvertedNormally("w:ins"); }); -- cgit v1.2.3