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

Class AncestorExample

tests/test_apis.py:991–1000  ·  view source on GitHub ↗

Ancestor Test.

Source from the content-addressed store, hash-verified

989 """ Tests exclusion of tags in ancestor list. """
990
991 class AncestorExample(markdown.inlinepatterns.SimpleTagInlineProcessor):
992 """ Ancestor Test. """
993
994 ANCESTOR_EXCLUDES = ('a',)
995
996 def handleMatch(self, m, data):
997 """ Handle match. """
998 el = etree.Element(self.tag)
999 el.text = m.group(2)
1000 return el, m.start(0), m.end(0)
1001
1002 class AncestorExtension(markdown.Extension):
1003

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected