diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-10-14 19:18:30 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-10-14 19:18:30 +0100 |
| commit | 68a681c30a265c1b293fdd148d662b8169d64bae (patch) | |
| tree | 46a3c6d3dd5a47be98a01ca96bff954379ad5759 /lib/document-to-html.js | |
| parent | e0397dcd7f650e86898ceab97eedc5753494d9f5 (diff) | |
Use html.nonFreshElement in document-to-html
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"); } } |
