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

Method testTOCPermalink

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

Source from the content-addressed store, hash-verified

531 )
532
533 def testTOCPermalink(self):
534 self.assertMarkdownRenders(
535 self.dedent(
536 '''
537 # Hd 1
538
539 ## Hd 2
540 '''
541 ),
542 '<h1 id="hd-1">'
543 'Hd 1' # noqa
544 '<a class="headerlink" href="#hd-1" title="PL">' # noqa
545 '&para;' # noqa
546 '</a>' # noqa
547 '</h1>\n'
548 '<h2 id="hd-2">'
549 'Hd 2' # noqa
550 '<a class="headerlink" href="#hd-2" title="PL">' # noqa
551 '&para;' # noqa
552 '</a>' # noqa
553 '</h2>',
554 extensions=[TocExtension(permalink=True, permalink_title="PL")]
555 )
556
557 def testTOCPermalinkLeading(self):
558 self.assertMarkdownRenders(

Callers

nothing calls this directly

Calls 3

TocExtensionClass · 0.90
assertMarkdownRendersMethod · 0.80
dedentMethod · 0.80

Tested by

no test coverage detected