aboutsummaryrefslogtreecommitdiff
path: root/mammoth/docx/document_xml.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2014-05-11 18:01:31 +0100
committerMichael Williamson <mike@zwobble.org>2014-05-11 18:01:31 +0100
commit61e88321b9e5dc67a0373edc69f8114db8c1d3b7 (patch)
tree3f43fd006b6c095f91c2424086b273928881336c /mammoth/docx/document_xml.py
parent7e57058cf120717cc2d2fea3b897b12c3891b28a (diff)
Rename existing concept of style names to style IDs to match docx
Diffstat (limited to 'mammoth/docx/document_xml.py')
-rw-r--r--mammoth/docx/document_xml.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/mammoth/docx/document_xml.py b/mammoth/docx/document_xml.py
index e4682a6..5023ec5 100644
--- a/mammoth/docx/document_xml.py
+++ b/mammoth/docx/document_xml.py
@@ -42,7 +42,7 @@ def _create_reader(numbering, content_types, relationships, docx_file):
@handler("w:r")
def run(element):
properties = element.find_child_or_null("w:rPr")
- style_name = properties \
+ style_id = properties \
.find_child_or_null("w:rStyle") \
.attributes.get("w:val")
is_bold = properties.find_child("w:b")
@@ -51,7 +51,7 @@ def _create_reader(numbering, content_types, relationships, docx_file):
return _read_xml_elements(element.children) \
.map(lambda children: documents.run(
children=children,
- style_name=style_name,
+ style_id=style_id,
is_bold=is_bold,
is_italic=is_italic,
))
@@ -60,7 +60,7 @@ def _create_reader(numbering, content_types, relationships, docx_file):
@handler("w:p")
def paragraph(element):
properties = element.find_child_or_null("w:pPr")
- style_name = properties \
+ style_id = properties \
.find_child_or_null("w:pStyle") \
.attributes.get("w:val")
numbering_properties = properties.find_child("w:numPr")
@@ -72,7 +72,7 @@ def _create_reader(numbering, content_types, relationships, docx_file):
return _read_xml_elements(element.children) \
.map(lambda children: documents.paragraph(
children=children,
- style_name=style_name,
+ style_id=style_id,
numbering=numbering,
))