From 123907f68de3b4d802bd305f37b8651551be3f71 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 11 Feb 2015 20:30:33 +0000 Subject: Convert hyperlinks with anchors to HTML --- tests/conversion_tests.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/conversion_tests.py b/tests/conversion_tests.py index 78fbce5..ced1d9e 100644 --- a/tests/conversion_tests.py +++ b/tests/conversion_tests.py @@ -201,13 +201,22 @@ def runs_are_converted_by_satisfying_matching_paths(): @istest -def docx_hyperlink_is_converted_to_anchor_tag(): +def docx_hyperlink_with_href_is_converted_to_anchor_tag(): result = convert_document_element_to_html( documents.hyperlink(href="http://example.com", children=[documents.Text("Hello")]), ) assert_equal('Hello', result.value) +@istest +def docx_hyperlink_with_internal_anchor_reference_is_converted_to_anchor_tag(): + result = convert_document_element_to_html( + documents.hyperlink(anchor="start", children=[documents.Text("Hello")]), + id_prefix="doc-42", + ) + assert_equal('Hello', result.value) + + @istest def docx_tab_is_converted_to_tab_in_html(): result = convert_document_element_to_html(documents.tab()) -- cgit v1.2.3