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)
| 486 | |
| 487 | """ |
| 488 | def handleMatch(self, m: re.Match[str], data: str) -> tuple[etree.Element, int, int]: # pragma: no cover |
| 489 | """ |
| 490 | Return [`Element`][xml.etree.ElementTree.Element] in following format: |
| 491 | `<tag1><tag2>group(2)</tag2>group(3)</tag2>` where `group(3)` is optional. |
| 492 | |
| 493 | """ |
| 494 | tag1, tag2 = self.tag.split(",") |
| 495 | el1 = etree.Element(tag1) |
| 496 | el2 = etree.SubElement(el1, tag2) |
| 497 | el2.text = m.group(2) |
| 498 | if len(m.groups()) == 3: |
| 499 | el2.tail = m.group(3) |
| 500 | return el1, m.start(0), m.end(0) |
| 501 | |
| 502 | |
| 503 | class HtmlInlineProcessor(InlineProcessor): |
nothing calls this directly
no outgoing calls
no test coverage detected