diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-02-08 20:40:36 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-02-08 20:40:36 +0000 |
| commit | 8226b3196647b56a4af7567bdccb63141958aa3b (patch) | |
| tree | 8190dd933bce768ff8bbb0ddb8d6696829acbe58 /tests | |
| parent | a098466259ce25c82f5c5faa5b2dcd3b9c8f90d6 (diff) | |
Ignore img tags without alt nor src in markdown writer
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/writers/markdown_tests.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/writers/markdown_tests.py b/tests/writers/markdown_tests.py index f0e4ba0..e013c7c 100644 --- a/tests/writers/markdown_tests.py +++ b/tests/writers/markdown_tests.py @@ -131,6 +131,13 @@ def images_are_written_even_if_they_dont_have_a_src_attribute(): writer = _create_writer() writer.self_closing("img", {"alt": "Alt Text"}) assert_equal("![Alt Text]()", writer.as_string()) + + +@istest +def image_elements_are_ignored_if_they_have_no_src_and_no_alt_text(): + writer = _create_writer() + writer.self_closing("img") + assert_equal("", writer.as_string()) def _create_writer(): |
