diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-02-25 19:10:56 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-02-25 19:10:56 +0000 |
| commit | 574cc44b8abb789c24b2c7bc3087861c07e1f45b (patch) | |
| tree | 206406804168ec72a66e3b6c06d188e1c77b5d9f /tests | |
| parent | 3ed30fd8bc749d3c8009b3fd9e8ce125af5ee441 (diff) | |
Allow bold runs to be configured using style mapping
Diffstat (limited to 'tests')
| -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 a5ae9cb..78530a9 100644 --- a/tests/conversion_tests.py +++ b/tests/conversion_tests.py @@ -148,7 +148,7 @@ def bulleted_styles_dont_match_plain_paragraph(): @istest -def bold_runs_are_wrapped_in_strong_tags(): +def bold_runs_are_wrapped_in_strong_tags_by_default(): result = convert_document_element_to_html( documents.run(children=[documents.text("Hello")], is_bold=True), ) @@ -156,6 +156,15 @@ def bold_runs_are_wrapped_in_strong_tags(): @istest +def bold_runs_can_be_configured_with_style_mapping(): + result = convert_document_element_to_html( + documents.run(children=[documents.text("Hello")], is_bold=True), + style_map=[_style_mapping("b => b")] + ) + assert_equal("<b>Hello</b>", result.value) + + +@istest def italic_runs_are_wrapped_in_emphasis_tags(): result = convert_document_element_to_html( documents.run(children=[documents.text("Hello")], is_italic=True), |
