From cd2a10d64f6f2a1a42c1a3f0c144a3a521083cd8 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 17 Jun 2015 15:54:29 +0100 Subject: Allow strikethrough to be configured in style mapping --- tests/mammoth_tests.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/mammoth_tests.py') 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 @@ -137,6 +137,13 @@ def strikethrough_is_converted_to_s_element_by_default(): assert_equal("

Today's Special: Salmon Sold out

", result.value) +@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("

Today's Special: Salmon Sold out

", result.value) + + @istest def transform_document_is_applied_to_document_before_conversion(): def transform_document(document): -- cgit v1.2.3