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

Method testAnchorLink

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

TocExtensionClass · 0.90
assertMarkdownRendersMethod · 0.80
dedentMethod · 0.80

Tested by

no test coverage detected