diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-12-14 16:39:03 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-12-14 16:39:03 +0000 |
| commit | a6d9064bbb71653dc0f43898d0247e5344c30f6b (patch) | |
| tree | 7131d65da829b40e5da409c5569175ef47f1e935 /tests/conversion_tests.py | |
| parent | 996491337023abe6033c3caf76dfa4501bd27ce3 (diff) | |
Convert hyperlinks
Diffstat (limited to 'tests/conversion_tests.py')
| -rw-r--r-- | tests/conversion_tests.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/conversion_tests.py b/tests/conversion_tests.py index 174e5b5..c4dc719 100644 --- a/tests/conversion_tests.py +++ b/tests/conversion_tests.py @@ -101,5 +101,13 @@ def runs_are_converted_by_satisfying_matching_paths(): assert_equal('<span class="tip">Tip</span>', result.value) +@istest +def docx_hyperlink_is_converted_to_anchor_tag(): + result = convert_document_element_to_html( + documents.hyperlink(href="http://example.com", children=[documents.Text("Hello")]), + ) + assert_equal('<a href="http://example.com">Hello</a>', result.value) + + def _run_with_text(text): return documents.run(children=[documents.text(text)]) |
