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

Method testRawHtmlInTOC

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

Source from the content-addressed store, hash-verified

304 )
305
306 def testRawHtmlInTOC(self):
307 self.assertMarkdownRenders(
308 '# Foo <b>Bar</b> Baz.',
309 '<h1 id="foo-bar-baz">Foo <b>Bar</b> Baz.</h1>',
310 expected_attrs={
311 'toc': (
312 '<div class="toc">\n'
313 '<ul>\n' # noqa
314 '<li><a href="#foo-bar-baz">Foo Bar Baz.</a></li>\n' # noqa
315 '</ul>\n' # noqa
316 '</div>\n'
317 ),
318 'toc_tokens': [{
319 'level': 1,
320 'id': 'foo-bar-baz',
321 'name': 'Foo Bar Baz.',
322 'html': 'Foo <b>Bar</b> Baz.',
323 'data-toc-label': '',
324 'children': []
325 }]
326 }
327 )
328
329 def testTOCBaseLevel(self):
330 self.assertMarkdownRenders(

Callers

nothing calls this directly

Calls 1

assertMarkdownRendersMethod · 0.80

Tested by

no test coverage detected