MCPcopy
hub / github.com/Python-Markdown/markdown / handleMatch

Method handleMatch

markdown/inlinepatterns.py:962–967  ·  view source on GitHub ↗

Return an `a` [`Element`][xml.etree.ElementTree.Element] of `group(1)`.

(self, m: re.Match[str], data: str)

Source from the content-addressed store, hash-verified

960class AutolinkInlineProcessor(InlineProcessor):
961 """ Return a link Element given an auto-link (`<http://example/com>`). """
962 def handleMatch(self, m: re.Match[str], data: str) -> tuple[etree.Element, int, int]:
963 """ Return an `a` [`Element`][xml.etree.ElementTree.Element] of `group(1)`. """
964 el = etree.Element("a")
965 el.set('href', self.unescape(m.group(1)))
966 el.text = util.AtomicString(m.group(1))
967 return el, m.start(0), m.end(0)
968
969
970class AutomailInlineProcessor(InlineProcessor):

Callers

nothing calls this directly

Calls 2

setMethod · 0.80
unescapeMethod · 0.45

Tested by

no test coverage detected