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

Method testRawHtmlInTOC

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

assertMarkdownRendersMethod · 0.80

Tested by

no test coverage detected