diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-05-24 09:57:25 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-05-24 09:57:25 +0100 |
| commit | 3db53874ec83b67df0a313ee870ed5b55a8641cd (patch) | |
| tree | 6379af73ddca6eca5cb834bf82229518778640da /mammoth | |
| parent | c08fe8c9b5b04c7f3182bf70b0efb1c00c598187 (diff) | |
Support styles without a name
Diffstat (limited to 'mammoth')
| -rw-r--r-- | mammoth/docx/styles_xml.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mammoth/docx/styles_xml.py b/mammoth/docx/styles_xml.py index ab3cc0f..1166f11 100644 --- a/mammoth/docx/styles_xml.py +++ b/mammoth/docx/styles_xml.py @@ -33,7 +33,7 @@ def read_styles_xml_element(element): def _read_style_element(element): style_id = element.attributes["w:styleId"] - name = element.find_child("w:name").attributes["w:val"] + name = element.find_child_or_null("w:name").attributes.get("w:val") return Style(style_id=style_id, name=name) |
