aboutsummaryrefslogtreecommitdiff
path: root/mammoth
diff options
context:
space:
mode:
Diffstat (limited to 'mammoth')
-rw-r--r--mammoth/docx/styles_xml.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mammoth/docx/styles_xml.py b/mammoth/docx/styles_xml.py
index 22c8899..c220740 100644
--- a/mammoth/docx/styles_xml.py
+++ b/mammoth/docx/styles_xml.py
@@ -31,7 +31,8 @@ def read_styles_xml_element(element):
def _read_style_element(element):
element_type = element.attributes["w:type"]
style_id = element.attributes["w:styleId"]
- return Style(element_type=element_type, style_id=style_id)
+ name = element.find_child("w:name").attributes["w:val"]
+ return Style(element_type=element_type, style_id=style_id, name=name)
-Style = collections.namedtuple("Style", ["element_type", "style_id"])
+Style = collections.namedtuple("Style", ["element_type", "style_id", "name"])