MCPcopy Create free account
hub / github.com/Python-Markdown/markdown / testTOCMarker

Method testTOCMarker

tests/test_syntax/extensions/test_toc.py:35–57  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

33 }
34
35 def testTOCMarker(self):
36 self.assertMarkdownRenders(
37 self.dedent(
38 '''
39 [TOC]
40
41 # Header 1
42
43 ## Header 2
44 '''
45 ),
46 '<div class="toc">\n'
47 '<ul>\n' # noqa
48 '<li><a href="#header-1">Header 1</a>' # noqa
49 '<ul>\n' # noqa
50 '<li><a href="#header-2">Header 2</a></li>\n' # noqa
51 '</ul>\n' # noqa
52 '</li>\n' # noqa
53 '</ul>\n' # noqa
54 '</div>\n'
55 '<h1 id="header-1">Header 1</h1>\n'
56 '<h2 id="header-2">Header 2</h2>'
57 )
58
59 def testNoTOCMarker(self):
60 self.assertMarkdownRenders(

Callers

nothing calls this directly

Calls 2

assertMarkdownRendersMethod · 0.80
dedentMethod · 0.80

Tested by

no test coverage detected