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

Method handleMatch

markdown/inlinepatterns.py:1313–1318  ·  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

1311class AutolinkInlineProcessor(InlineProcessor):
1312 """ Return a link Element given an auto-link (`<http://example/com>`). """
1313 def handleMatch(self, m: re.Match[str], data: str) -> tuple[etree.Element, int, int]:
1314 """ Return an `a` [`Element`][xml.etree.ElementTree.Element] of `group(1)`. """
1315 el = etree.Element("a")
1316 el.set('href', self.unescape(m.group(1)))
1317 el.text = util.AtomicString(m.group(1))
1318 return el, m.start(0), m.end(0)
1319
1320
1321class AutomailInlineProcessor(InlineProcessor):

Callers

nothing calls this directly

Calls 2

setMethod · 0.80
unescapeMethod · 0.45

Tested by

no test coverage detected