Return a link Element given an auto-link (` `).
| 958 | |
| 959 | |
| 960 | class 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 | |
| 970 | class AutomailInlineProcessor(InlineProcessor): |
no outgoing calls
no test coverage detected
searching dependent graphs…