diff options
| author | Michael Williamson <mike@zwobble.org> | 2019-11-03 16:27:38 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2019-11-03 16:27:38 +0000 |
| commit | 1886bd66e135eccf2c032979b3025ca6b74fbeca (patch) | |
| tree | 1a3bdb4bb9fe2d4822ea70d68556e2577bcaa7cc /tests | |
| parent | efe679831a32c1cee59c50b47d0a8668fad0e800 (diff) | |
Test collapse of hyperlinks
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")]), |
