diff options
| author | Michael Williamson <mike@zwobble.org> | 2022-03-09 21:00:46 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2022-03-09 21:00:46 +0000 |
| commit | 8e95f5abce943c9d2bf8dc859d628085beb15901 (patch) | |
| tree | 4a636cb5490b9fbf55b2ac816f8010d716dc76c9 /mammoth/docx/body_xml.py | |
| parent | e5e1601624e6dde4c888da2f3d27b1709b37127f (diff) | |
Ignore w:u elements when w:val is missing
Diffstat (limited to 'mammoth/docx/body_xml.py')
| -rw-r--r-- | mammoth/docx/body_xml.py | 2 |
1 files changed, 1 insertions, 1 deletions
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") |
