From b5de440655ace03fb512a67429baf3123126ab0e Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 8 Apr 2015 18:21:11 +0100 Subject: Make style names in style mappings case insensitive --- tests/conversion_tests.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests') diff --git a/tests/conversion_tests.py b/tests/conversion_tests.py index 994b1f0..4b5b461 100644 --- a/tests/conversion_tests.py +++ b/tests/conversion_tests.py @@ -65,6 +65,19 @@ def style_mappings_using_style_names_can_be_used_to_map_paragraphs(): assert_equal('

Tip

', result.value) +@istest +def style_names_in_style_mappings_are_case_insensitive(): + result = convert_document_element_to_html( + documents.paragraph(style_id="TipsParagraph", style_name="Tips Paragraph", children=[ + _run_with_text("Tip") + ]), + style_map=[ + style_reader.read_style("p[style-name='tips paragraph'] => p.tip") + ] + ) + assert_equal('

Tip

', result.value) + + @istest def default_paragraph_style_is_used_if_no_matching_style_is_found(): result = convert_document_element_to_html( -- cgit v1.2.3