diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-06-17 15:54:29 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-06-17 15:54:29 +0100 |
| commit | cd2a10d64f6f2a1a42c1a3f0c144a3a521083cd8 (patch) | |
| tree | a251f341d5181ef347636e4d5ab3657782d8367b /tests/mammoth_tests.py | |
| parent | 3bfa77d64e69d20609c8321a067bfa2651a7eabc (diff) | |
Allow strikethrough to be configured in style mapping
Diffstat (limited to 'tests/mammoth_tests.py')
| -rw-r--r-- | tests/mammoth_tests.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/mammoth_tests.py b/tests/mammoth_tests.py index 84cb6ea..9f37db0 100644 --- a/tests/mammoth_tests.py +++ b/tests/mammoth_tests.py @@ -138,6 +138,13 @@ def strikethrough_is_converted_to_s_element_by_default(): @istest +def strikethrough_conversion_can_be_configured_with_style_mapping(): + with open(test_path("strikethrough.docx"), "rb") as fileobj: + result = mammoth.convert_to_html(fileobj=fileobj, style_map="strike => del") + assert_equal("<p><del>Today's Special: Salmon</del> Sold out</p>", result.value) + + +@istest def transform_document_is_applied_to_document_before_conversion(): def transform_document(document): document.children[0].style_id = "Heading1" |
