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

Class AutolinkInlineProcessor

markdown/inlinepatterns.py:1012–1019  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1010
1011
1012class AutolinkInlineProcessor(InlineProcessor):
1013 """ Return a link Element given an auto-link (`<http://example/com>`). """
1014 def handleMatch(self, m: re.Match[str], data: str) -> tuple[etree.Element, int, int]:
1015 """ Return an `a` [`Element`][xml.etree.ElementTree.Element] of `group(1)`. """
1016 el = etree.Element("a")
1017 el.set('href', self.unescape(m.group(1)))
1018 el.text = util.AtomicString(m.group(1))
1019 return el, m.start(0), m.end(0)
1020
1021
1022class AutomailInlineProcessor(InlineProcessor):

Callers 1

build_inlinepatternsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected