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

Method testRawHtmlInTOC

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

Source from the content-addressed store, hash-verified

257 )
258
259 def testRawHtmlInTOC(self):
260 self.assertMarkdownRenders(
261 '# Foo <b>Bar</b> Baz.',
262 '<h1 id="foo-bar-baz">Foo <b>Bar</b> Baz.</h1>',
263 expected_attrs={
264 'toc': (
265 '<div class="toc">\n'
266 '<ul>\n' # noqa
267 '<li><a href="#foo-bar-baz">Foo Bar Baz.</a></li>\n' # noqa
268 '</ul>\n' # noqa
269 '</div>\n'
270 ),
271 'toc_tokens': [{
272 'level': 1,
273 'id': 'foo-bar-baz',
274 'name': 'Foo Bar Baz.',
275 'html': 'Foo <b>Bar</b> Baz.',
276 'data-toc-label': '',
277 'children': []
278 }]
279 }
280 )
281
282 def testTOCBaseLevel(self):
283 self.assertMarkdownRenders(

Callers

nothing calls this directly

Calls 1

assertMarkdownRendersMethod · 0.80

Tested by

no test coverage detected