diff options
Diffstat (limited to 'lib/document-to-html.js')
| -rw-r--r-- | lib/document-to-html.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/document-to-html.js b/lib/document-to-html.js index f296c11..3d3e8db 100644 --- a/lib/document-to-html.js +++ b/lib/document-to-html.js @@ -113,16 +113,16 @@ function DocumentConversion(options) { result = convertUnderline(result); } if (run.verticalAlignment === documents.verticalAlignment.subscript) { - result = wrap(result, "sub"); + result = wrapInNonFreshElement(result, "sub"); } if (run.verticalAlignment === documents.verticalAlignment.superscript) { - result = wrap(result, "sup"); + result = wrapInNonFreshElement(result, "sup"); } if (run.isItalic) { - result = wrap(result, "em"); + result = wrapInNonFreshElement(result, "em"); } if (run.isBold) { - result = wrap(result, "strong"); + result = wrapInNonFreshElement(result, "strong"); } if (style) { result = Html.pathToNode(style.to, [result]); @@ -131,8 +131,8 @@ function DocumentConversion(options) { }); } - function wrap(node, tagName) { - return Html.elementWithTag(htmlPaths.element(tagName, {}, {fresh: false}), [node]); + function wrapInNonFreshElement(node, tagName) { + return Html.nonFreshElement(tagName, {}, [node]); } function convertUnderline(runHtml) { @@ -144,7 +144,7 @@ function DocumentConversion(options) { if (style) { return Html.pathToNode(style.to, [result]); } else { - return wrap(result, "s"); + return wrapInNonFreshElement(result, "s"); } } |
