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

Method testAnchorLink

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

Source from the content-addressed store, hash-verified

602 )
603
604 def testAnchorLink(self):
605 self.assertMarkdownRenders(
606 self.dedent(
607 '''
608 # Header 1
609
610 ## Header *2*
611 '''
612 ),
613 self.dedent(
614 '''
615 <h1 id="header-1"><a class="toclink" href="#header-1">Header 1</a></h1>
616 <h2 id="header-2"><a class="toclink" href="#header-2">Header <em>2</em></a></h2>
617 ''&#x27;
618 ),
619 extensions=[TocExtension(anchorlink=True)]
620 )
621
622 def testAnchorLinkWithSingleInlineCode(self):
623 self.assertMarkdownRenders(

Callers

nothing calls this directly

Calls 3

TocExtensionClass · 0.90
assertMarkdownRendersMethod · 0.80
dedentMethod · 0.80

Tested by

no test coverage detected