aboutsummaryrefslogtreecommitdiff
path: root/mammoth
diff options
context:
space:
mode:
Diffstat (limited to 'mammoth')
-rw-r--r--mammoth/docx/document_xml.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mammoth/docx/document_xml.py b/mammoth/docx/document_xml.py
index 403f880..c3fb1b7 100644
--- a/mammoth/docx/document_xml.py
+++ b/mammoth/docx/document_xml.py
@@ -22,7 +22,11 @@ def _create_reader(numbering):
@handler("w:r")
def run(element):
- return documents.run(_read_xml_elements(element.children))
+ properties = element.find_child_or_null("w:rPr")
+ style_name = properties \
+ .find_child_or_null("w:rStyle") \
+ .attributes.get("w:val")
+ return documents.run(_read_xml_elements(element.children), style_name)
@handler("w:p")