aboutsummaryrefslogtreecommitdiff
path: root/mammoth/conversion.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2014-09-27 17:24:12 +0100
committerMichael Williamson <mike@zwobble.org>2014-09-27 17:24:12 +0100
commit0bb6df24ccfcbccb4d9d81f9fd3c1efb94d5ae8a (patch)
treecc8aa7a27c6aa1e718d7603341458ddb8f6d85a7 /mammoth/conversion.py
parent9fb300452f2e1734e531abde614b8513d0edd093 (diff)
Generate sub and sup elements for subscript and superscript text
Diffstat (limited to 'mammoth/conversion.py')
-rw-r--r--mammoth/conversion.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mammoth/conversion.py b/mammoth/conversion.py
index 0a91a1d..9eaa3d2 100644
--- a/mammoth/conversion.py
+++ b/mammoth/conversion.py
@@ -85,6 +85,10 @@ class DocumentConverter(object):
run_generator.start("strong")
if run.is_italic:
run_generator.start("em")
+ if run.vertical_alignment == documents.VerticalAlignment.superscript:
+ run_generator.start("sup")
+ if run.vertical_alignment == documents.VerticalAlignment.subscript:
+ run_generator.start("sub")
if run.is_underline and self._convert_underline is not None:
self._convert_underline(run_generator)
self._convert_elements_to_html(run.children, run_generator)