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

Class AutolinkInlineProcessor

markdown/inlinepatterns.py:1311–1318  ·  view source on GitHub ↗

Return a link Element given an auto-link (` `).

Source from the content-addressed store, hash-verified

1309
1310
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 1

build_inlinepatternsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected