From 71ba0de364add2c5ac0285ae1d8e69cab132baf8 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 1 Dec 2013 13:36:13 +0000 Subject: Read italic property of runs --- 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 03975b2..d054eef 100644 --- a/mammoth/documents.py +++ b/mammoth/documents.py @@ -2,7 +2,7 @@ import collections Document = collections.namedtuple("Document", ["children"]) Paragraph = collections.namedtuple("Paragraph", ["children", "style_name", "numbering"]) -Run = collections.namedtuple("Run", ["children", "style_name", "is_bold"]) +Run = collections.namedtuple("Run", ["children", "style_name", "is_bold", "is_italic"]) Text = collections.namedtuple("Text", ["value"]) @@ -11,7 +11,7 @@ document = Document def paragraph(children, style_name=None, numbering=None): return Paragraph(children, style_name, numbering) -def run(children, style_name=None, is_bold=None): - return Run(children, style_name, bool(is_bold)) +def run(children, style_name=None, is_bold=None, is_italic=None): + return Run(children, style_name, bool(is_bold), bool(is_italic)) text = Text -- cgit v1.2.3