aboutsummaryrefslogtreecommitdiff
path: root/lib/document-to-html.js
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-04-01 16:57:41 +0100
committerMichael Williamson <mike@zwobble.org>2013-04-01 16:57:41 +0100
commit25109ca7e318e188229cac92552ba0dcd7e897a1 (patch)
tree324cecb9ddc3cd5ad85c45143cbe1513aa3e2edc /lib/document-to-html.js
parent376094a18d76eef4335e374455f0b2869e53120b (diff)
Add conversion of hyperlink elements to <a> tags
Diffstat (limited to 'lib/document-to-html.js')
-rw-r--r--lib/document-to-html.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/document-to-html.js b/lib/document-to-html.js
index caccb6f..1224878 100644
--- a/lib/document-to-html.js
+++ b/lib/document-to-html.js
@@ -72,6 +72,11 @@ function DocumentConverter(options) {
"run": convertRun,
"text": function(element, html) {
html.text(element.value);
+ },
+ "hyperlink": function(element, html) {
+ html.push(styles.element("a", {href: element.href}));
+ convertElements(element.children, html);
+ html.pop();
}
};
return {