From 8e95f5abce943c9d2bf8dc859d628085beb15901 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 9 Mar 2022 21:00:46 +0000 Subject: Ignore w:u elements when w:val is missing --- mammoth/docx/body_xml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mammoth') diff --git a/mammoth/docx/body_xml.py b/mammoth/docx/body_xml.py index 8d727a5..c11e9e5 100644 --- a/mammoth/docx/body_xml.py +++ b/mammoth/docx/body_xml.py @@ -127,7 +127,7 @@ def _create_reader(numbering, content_types, relationships, styles, docx_file, f return element and element.attributes.get("w:val") not in ["false", "0"] def read_underline_element(element): - return element and element.attributes.get("w:val") not in ["false", "0", "none"] + return element and element.attributes.get("w:val") not in [None, "false", "0", "none"] def paragraph(element): properties = element.find_child_or_null("w:pPr") -- cgit v1.2.3