diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-02-08 20:28:13 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-02-08 20:28:13 +0000 |
| commit | 7aa2d2ba54ab0c2d908a4b0fbe683bce63a54f45 (patch) | |
| tree | 572487ee14ab32bedad7106384cab549b98f2830 /tests | |
| parent | d23efd5811e1ebeae915fdfb2cd8e8ede6b0f0ca (diff) | |
Insert anchor tags when elements have IDs in markdown writer
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/writers/markdown_tests.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/writers/markdown_tests.py b/tests/writers/markdown_tests.py index 9448b50..79ddb6d 100644 --- a/tests/writers/markdown_tests.py +++ b/tests/writers/markdown_tests.py @@ -94,6 +94,14 @@ def anchor_tags_without_href_attribute_are_treated_as_ordinary_text(): assert_equal("Hello", writer.as_string()) +@istest +def elements_with_ids_have_anchor_tags_with_ids_appended_to_start_of_markdown_element(): + writer = _create_writer() + writer.start("h1", {"id": "start"}) + writer.text("Hello") + writer.end("h1") + assert_equal('# <a id="start"></a>Hello\n\n', writer.as_string()) + def _create_writer(): return MarkdownWriter() |
