From bf658f8747fbea1509ff30ca0adb374aece916cc Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Tue, 4 Oct 2016 21:58:35 +0100 Subject: Treat 0 as false in boolean elements --- mammoth/docx/body_xml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mammoth/docx') diff --git a/mammoth/docx/body_xml.py b/mammoth/docx/body_xml.py index 2e16c26..22d8440 100644 --- a/mammoth/docx/body_xml.py +++ b/mammoth/docx/body_xml.py @@ -98,7 +98,7 @@ def _create_reader(numbering, content_types, relationships, styles, docx_file, f )) def read_boolean_element(element): - return element and element.attributes.get("w:val") != "false" + return element and element.attributes.get("w:val") not in ["false", "0"] def paragraph(element): -- cgit v1.2.3