aboutsummaryrefslogtreecommitdiff
path: root/lib/document-to-html.js
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2014-09-27 17:11:03 +0100
committerMichael Williamson <mike@zwobble.org>2014-09-27 17:11:03 +0100
commita8ea510e657bb9221ad724f9d0184b045e06fb1b (patch)
tree77cc0d11f836750081ff38187df03aac4cd428dd /lib/document-to-html.js
parent92be647aab6949d504f60a54099454e527009cf7 (diff)
Convert superscript and subscript to sup and sub elements
Diffstat (limited to 'lib/document-to-html.js')
-rw-r--r--lib/document-to-html.js7
1 files changed, 7 insertions, 0 deletions
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);
}