From 935d55bc1320612bf7f2e46c3510f43eb0531108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Gro=C3=9F?= Date: Thu, 17 Mar 2016 14:03:07 +0000 Subject: Add failing toc test --- tests/test_extensions.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/test_extensions.py') diff --git a/tests/test_extensions.py b/tests/test_extensions.py index 6d47e0e..a5b739e 100644 --- a/tests/test_extensions.py +++ b/tests/test_extensions.py @@ -775,6 +775,21 @@ class TestTOC(TestCaseWithAssertStartsWith): '

Header 2

' ) + def testAnchorLinkWithInlineCode(self): + """ Test TOC Anchorlink with inline code. """ + md = markdown.Markdown( + extensions=[markdown.extensions.toc.TocExtension(anchorlink=True)] + ) + text = '# This is `code` and `this` too.' + self.assertEqual( + md.convert(text), + '

' # noqa + '' # noqa + 'This is code and this too.' # noqa + '' # noqa + '

' # noqa + ) + def testTitle(self): """ Test TOC Title. """ md = markdown.Markdown( -- cgit v1.2.3