aboutsummaryrefslogtreecommitdiff
path: root/mammoth/conversion.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-02-25 19:12:40 +0000
committerMichael Williamson <mike@zwobble.org>2016-02-25 19:12:40 +0000
commitda449cd99a6370721cf44b6115885a299207cfef (patch)
treefb6d379e44952259ba47a3274b83562fa3890fe3 /mammoth/conversion.py
parent574cc44b8abb789c24b2c7bc3087861c07e1f45b (diff)
Allow italic runs to be configured using style mapping
Diffstat (limited to 'mammoth/conversion.py')
-rw-r--r--mammoth/conversion.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mammoth/conversion.py b/mammoth/conversion.py
index 78994e9..94ffeae 100644
--- a/mammoth/conversion.py
+++ b/mammoth/conversion.py
@@ -112,7 +112,7 @@ class _DocumentConverter(documents.ElementVisitor):
if run.is_bold:
self._convert_run_property(run_generator, "bold", default="strong")
if run.is_italic:
- run_generator.start("em")
+ self._convert_run_property(run_generator, "italic", default="em")
if run.vertical_alignment == documents.VerticalAlignment.superscript:
run_generator.start("sup")
if run.vertical_alignment == documents.VerticalAlignment.subscript:
@@ -257,7 +257,7 @@ class _DocumentConverter(documents.ElementVisitor):
def _document_matcher_matches(matcher, element, element_type):
- if matcher.element_type in ["underline", "strikethrough", "bold"]:
+ if matcher.element_type in ["underline", "strikethrough", "bold", "italic"]:
return matcher.element_type == element_type
else:
return (