MCPcopy Index your code
hub / github.com/Python-Markdown/markdown / testTOCPermalink

Method testTOCPermalink

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

Source from the content-addressed store, hash-verified

445 )
446
447 def testTOCPermalink(self):
448 self.assertMarkdownRenders(
449 self.dedent(
450 '''
451 # Hd 1
452
453 ## Hd 2
454 '''
455 ),
456 '<h1 id="hd-1">'
457 'Hd 1' # noqa
458 '<a class="headerlink" href="#hd-1" title="PL">' # noqa
459 '&para;' # noqa
460 '</a>' # noqa
461 '</h1>\n'
462 '<h2 id="hd-2">'
463 'Hd 2' # noqa
464 '<a class="headerlink" href="#hd-2" title="PL">' # noqa
465 '&para;' # noqa
466 '</a>' # noqa
467 '</h2>',
468 extensions=[TocExtension(permalink=True, permalink_title="PL")]
469 )
470
471 def testTOCPermalinkLeading(self):
472 self.assertMarkdownRenders(

Callers

nothing calls this directly

Calls 3

TocExtensionClass · 0.90
assertMarkdownRendersMethod · 0.80
dedentMethod · 0.80

Tested by

no test coverage detected