From d23efd5811e1ebeae915fdfb2cd8e8ede6b0f0ca Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 8 Feb 2015 20:24:47 +0000 Subject: Ignore anchor tags with no href attribute --- tests/writers/markdown_tests.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/writers') diff --git a/tests/writers/markdown_tests.py b/tests/writers/markdown_tests.py index bfa1e1b..9448b50 100644 --- a/tests/writers/markdown_tests.py +++ b/tests/writers/markdown_tests.py @@ -85,6 +85,15 @@ def anchor_tags_are_written_as_hyperlinks(): assert_equal("[Hello](http://example.com)", writer.as_string()) +@istest +def anchor_tags_without_href_attribute_are_treated_as_ordinary_text(): + writer = _create_writer() + writer.start("a"); + writer.text("Hello"); + writer.end("a"); + assert_equal("Hello", writer.as_string()) + + def _create_writer(): return MarkdownWriter() -- cgit v1.2.3