diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/conversion_tests.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/conversion_tests.py b/tests/conversion_tests.py index 234c7ef..878c804 100644 --- a/tests/conversion_tests.py +++ b/tests/conversion_tests.py @@ -291,6 +291,17 @@ def docx_hyperlink_with_href_is_converted_to_anchor_tag(): @istest +def docx_hyperlinks_can_be_collapsed(): + result = convert_document_element_to_html( + documents.document(children=[ + documents.hyperlink(href="http://example.com", children=[documents.Text("Hello ")]), + documents.hyperlink(href="http://example.com", children=[documents.Text("world")]), + ]) + ) + assert_equal('<a href="http://example.com">Hello world</a>', 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")]), |
