summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2017-05-30 11:32:40 +0100
committerMichael Williamson <mike@zwobble.org>2017-05-30 11:32:40 +0100
commit9545703e5e3cd3f0cbce363eda1d2c92e4eb0da0 (patch)
treee437db3c8f4a10d98e79e72469cc16cfa1486795 /lib
parenta9661689a03cdaf3590250a0bd7887f07aeafa7e (diff)
Convert hyperlink target frame to anchor target
Diffstat (limited to 'lib')
-rw-r--r--lib/document-to-html.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/document-to-html.js b/lib/document-to-html.js
index 93f9524..d0197cb 100644
--- a/lib/document-to-html.js
+++ b/lib/document-to-html.js
@@ -359,9 +359,13 @@ function DocumentConversion(options, comments) {
},
"hyperlink": function(element, messages, options) {
var href = element.anchor ? "#" + htmlId(element.anchor) : element.href;
+ var attributes = {href: href};
+ if (element.targetFrame != null) {
+ attributes.target = element.targetFrame;
+ }
var children = convertElements(element.children, messages, options);
- return [Html.freshElement("a", {href: href}, children)];
+ return [Html.freshElement("a", attributes, children)];
},
"bookmarkStart": function(element, messages, options) {
var anchor = Html.freshElement("a", {