aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-03-28 12:54:28 +0100
committerMichael Williamson <mike@zwobble.org>2016-03-28 13:47:37 +0100
commit4a61edf08990a0ed8c243f9001d9069d7a644a50 (patch)
treef6ecb4b3a1f6c54b907f02596dcb7fd036499fc5 /lib
parentb4a2cfa279ac777f1c331ffcf46da6f9394c5bf3 (diff)
Remove support for convertUnderline
Diffstat (limited to 'lib')
-rw-r--r--lib/document-to-html.js16
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/document-to-html.js b/lib/document-to-html.js
index baf900e..83c3b5f 100644
--- a/lib/document-to-html.js
+++ b/lib/document-to-html.js
@@ -134,7 +134,12 @@ function DocumentConversion(options) {
}
function convertUnderline(runHtml) {
- return (options.convertUnderline || defaultConvertUnderline)(runHtml);
+ var style = findStyle({type: "underline"});
+ if (style) {
+ return Html.pathToNode(style.to, [runHtml]);
+ } else {
+ return runHtml;
+ }
}
function convertRunProperty(result, elementType, defaultTagName) {
@@ -146,15 +151,6 @@ function DocumentConversion(options) {
}
}
- function defaultConvertUnderline(runHtml) {
- var style = findStyle({type: "underline"});
- if (style) {
- return Html.pathToNode(style.to, [runHtml]);
- } else {
- return runHtml;
- }
- }
-
function findStyle(element) {
for (var i = 0; i < styleMap.length; i++) {
if (styleMap[i].from.matches(element)) {