Commit d157374 for mammothjs

commit d1573743476bb99e8b9e3aba05e51ec51ae8f95f
Author: Michael Williamson <mike@zwobble.org>
Date:   Sat Sep 26 21:39:33 2026 +0100

    Read the children of w:customXml elements

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");
 });