Return [`Element`][xml.etree.ElementTree.Element] in following format: ` group(2) group(3) ` where `group(3)` is optional.
(self, m: re.Match[str], data: str)
| 505 | |
| 506 | """ |
| 507 | def handleMatch(self, m: re.Match[str], data: str) -> tuple[etree.Element, int, int]: # pragma: no cover |
| 508 | """ |
| 509 | Return [`Element`][xml.etree.ElementTree.Element] in following format: |
| 510 | `<tag1><tag2>group(2)</tag2>group(3)</tag2>` where `group(3)` is optional. |
| 511 | |
| 512 | """ |
| 513 | tag1, tag2 = self.tag.split(",") |
| 514 | el1 = etree.Element(tag1) |
| 515 | el2 = etree.SubElement(el1, tag2) |
| 516 | el2.text = m.group(2) |
| 517 | if len(m.groups()) == 3: |
| 518 | el2.tail = m.group(3) |
| 519 | return el1, m.start(0), m.end(0) |
| 520 | |
| 521 | |
| 522 | class HtmlInlineProcessor(InlineProcessor): |
nothing calls this directly
no outgoing calls
no test coverage detected