From 2c66c1e16ef035017d68b0023d02a1507a2c43cd Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 8 Jun 2014 22:10:01 +0100 Subject: Use style_name when converting paragraphs --- mammoth/documents.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mammoth/documents.py') diff --git a/mammoth/documents.py b/mammoth/documents.py index b8da897..4438b06 100644 --- a/mammoth/documents.py +++ b/mammoth/documents.py @@ -2,7 +2,7 @@ import dodge Document = dodge.data_class("Document", ["children"]) -Paragraph = dodge.data_class("Paragraph", ["children", "style_id", "numbering"]) +Paragraph = dodge.data_class("Paragraph", ["children", "style_id", "style_name", "numbering"]) Run = dodge.data_class("Run", ["children", "style_id", "is_bold", "is_italic"]) Text = dodge.data_class("Text", ["value"]) Hyperlink = dodge.data_class("Hyperlink", ["href", "children"]) @@ -20,8 +20,8 @@ class Image(object): document = Document -def paragraph(children, style_id=None, numbering=None): - return Paragraph(children, style_id, numbering) +def paragraph(children, style_id=None, style_name=None, numbering=None): + return Paragraph(children, style_id, style_name, numbering) def run(children, style_id=None, is_bold=None, is_italic=None): return Run(children, style_id, bool(is_bold), bool(is_italic)) -- cgit v1.2.3