aboutsummaryrefslogtreecommitdiff
path: root/mammoth/documents.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-12-01 13:36:13 +0000
committerMichael Williamson <mike@zwobble.org>2013-12-01 13:36:13 +0000
commit71ba0de364add2c5ac0285ae1d8e69cab132baf8 (patch)
tree593a4069882f9dc6913a12bb2ac356d8e4ef7f1f /mammoth/documents.py
parentbc62c8382815d5ca3b0812247cbc46ba8430ebab (diff)
Read italic property of runs
Diffstat (limited to 'mammoth/documents.py')
-rw-r--r--mammoth/documents.py6
1 files changed, 3 insertions, 3 deletions
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