summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2017-05-30 11:41:21 +0100
committerMichael Williamson <mike@zwobble.org>2017-05-30 11:41:21 +0100
commit07d35b00521754a29e800d6d5eaf646a45eb7e2e (patch)
tree431330204ee3c8d975c11bca2462bc265c59074e /tests
parentb5eebcb970dca395f4e199fc26cc6971798a951d (diff)
Convert hyperlink target frame to anchor target
Diffstat (limited to 'tests')
-rw-r--r--tests/conversion_tests.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/conversion_tests.py b/tests/conversion_tests.py
index 9b81bf1..77b0a30 100644
--- a/tests/conversion_tests.py
+++ b/tests/conversion_tests.py
@@ -281,6 +281,18 @@ def docx_hyperlink_with_internal_anchor_reference_is_converted_to_anchor_tag():
@istest
+def hyperlink_target_frame_is_used_as_anchor_target():
+ result = convert_document_element_to_html(
+ documents.hyperlink(
+ anchor="start",
+ target_frame="_blank",
+ children=[documents.Text("Hello")],
+ ),
+ )
+ assert_equal('<a href="#start" target="_blank">Hello</a>', result.value)
+
+
+@istest
def bookmarks_are_converted_to_anchors_with_ids():
result = convert_document_element_to_html(
documents.bookmark(name="start"),