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

Method testTOCPermalink

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

TocExtensionClass · 0.90
assertMarkdownRendersMethod · 0.80
dedentMethod · 0.80

Tested by

no test coverage detected