Return a link Element given an auto-link (` `).
| 1010 | |
| 1011 | |
| 1012 | class 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 | |
| 1022 | class AutomailInlineProcessor(InlineProcessor): |
no outgoing calls
no test coverage detected