diff options
| author | Michael Williamson <mike@zwobble.org> | 2017-04-03 18:31:03 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2017-04-03 18:31:03 +0100 |
| commit | dbcb7129f21201a41ac0c41657e31b0c21b5f724 (patch) | |
| tree | 6c450d0386641e1747339fb72c788299e6f81efc /mammoth/docx | |
| parent | 495b10c1218773f13d64643f018dc3a2497f22cd (diff) | |
Read alignment for paragraphs
Diffstat (limited to 'mammoth/docx')
| -rw-r--r-- | mammoth/docx/body_xml.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mammoth/docx/body_xml.py b/mammoth/docx/body_xml.py index c2d7d44..e8ddb01 100644 --- a/mammoth/docx/body_xml.py +++ b/mammoth/docx/body_xml.py @@ -111,6 +111,7 @@ def _create_reader(numbering, content_types, relationships, styles, docx_file, f def paragraph(element): properties = element.find_child_or_null("w:pPr") + alignment = properties.find_child_or_null("w:jc").attributes.get("w:val") numbering = _read_numbering_properties(properties.find_child_or_null("w:numPr")) return _ReadResult.map_results( @@ -121,6 +122,7 @@ def _create_reader(numbering, content_types, relationships, styles, docx_file, f style_id=style[0], style_name=style[1], numbering=numbering, + alignment=alignment, )).append_extra() def _read_paragraph_style(properties): |
