diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-02-25 19:12:40 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-02-25 19:12:40 +0000 |
| commit | da449cd99a6370721cf44b6115885a299207cfef (patch) | |
| tree | fb6d379e44952259ba47a3274b83562fa3890fe3 /tests/conversion_tests.py | |
| parent | 574cc44b8abb789c24b2c7bc3087861c07e1f45b (diff) | |
Allow italic runs to be configured using style mapping
Diffstat (limited to 'tests/conversion_tests.py')
| -rw-r--r-- | tests/conversion_tests.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/conversion_tests.py b/tests/conversion_tests.py index 78530a9..8f0a696 100644 --- a/tests/conversion_tests.py +++ b/tests/conversion_tests.py @@ -165,7 +165,7 @@ def bold_runs_can_be_configured_with_style_mapping(): @istest -def italic_runs_are_wrapped_in_emphasis_tags(): +def italic_runs_are_wrapped_in_emphasis_tags_by_default(): result = convert_document_element_to_html( documents.run(children=[documents.text("Hello")], is_italic=True), ) @@ -173,6 +173,15 @@ def italic_runs_are_wrapped_in_emphasis_tags(): @istest +def italic_runs_can_be_configured_with_style_mapping(): + result = convert_document_element_to_html( + documents.run(children=[documents.text("Hello")], is_italic=True), + style_map=[_style_mapping("i => i")] + ) + assert_equal("<i>Hello</i>", result.value) + + +@istest def underline_runs_are_ignored_by_default(): result = convert_document_element_to_html( documents.run(children=[documents.text("Hello")], is_underline=True), |
