summaryrefslogtreecommitdiff
path: root/test
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 /test
parenta9661689a03cdaf3590250a0bd7887f07aeafa7e (diff)
Convert hyperlink target frame to anchor target
Diffstat (limited to 'test')
-rw-r--r--test/document-to-html.tests.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/document-to-html.tests.js b/test/document-to-html.tests.js
index a55f9a2..bf6631f 100644
--- a/test/document-to-html.tests.js
+++ b/test/document-to-html.tests.js
@@ -343,6 +343,17 @@ test('docx hyperlink with anchor is converted to <a>', function() {
});
});
+test('hyperlink target frame is used as anchor target', function() {
+ var hyperlink = new documents.Hyperlink(
+ [runOfText("Hello.")],
+ {anchor: "start", targetFrame: "_blank"}
+ );
+ var converter = new DocumentConverter();
+ return converter.convertToHtml(hyperlink).then(function(result) {
+ assert.equal(result.value, '<a href="#start" target="_blank">Hello.</a>');
+ });
+});
+
test('bookmarks are converted to anchors', function() {
var bookmarkStart = new documents.BookmarkStart({name: "_Peter"});
var converter = new DocumentConverter({