From da449cd99a6370721cf44b6115885a299207cfef Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Thu, 25 Feb 2016 19:12:40 +0000 Subject: Allow italic runs to be configured using style mapping --- mammoth/conversion.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mammoth') 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 ( -- cgit v1.2.3