From a8ea510e657bb9221ad724f9d0184b045e06fb1b Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 27 Sep 2014 17:11:03 +0100 Subject: Convert superscript and subscript to sup and sub elements --- lib/document-to-html.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib') diff --git a/lib/document-to-html.js b/lib/document-to-html.js index 9c1e5af..fa1c63b 100644 --- a/lib/document-to-html.js +++ b/lib/document-to-html.js @@ -1,6 +1,7 @@ var promises = require("./promises"); var async = require("async"); +var documents = require("./documents"); var htmlPaths = require("./html-paths"); var HtmlGenerator = require("./html-generator").HtmlGenerator; var results = require("./results"); @@ -103,6 +104,12 @@ function DocumentConversion(options) { if (run.isItalic) { runHtml.open(htmlPaths.element("em")); } + if (run.verticalAlignment === documents.verticalAlignment.superscript) { + runHtml.open(htmlPaths.element("sup")); + } + if (run.verticalAlignment === documents.verticalAlignment.subscript) { + runHtml.open(htmlPaths.element("sub")); + } if (run.isUnderline && options.convertUnderline) { options.convertUnderline(runHtml); } -- cgit v1.2.3