From 25109ca7e318e188229cac92552ba0dcd7e897a1 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 1 Apr 2013 16:57:41 +0100 Subject: Add conversion of hyperlink elements to tags --- lib/document-to-html.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/document-to-html.js') 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 { -- cgit v1.2.3