Abbreviation inline pattern.
| 182 | |
| 183 | @deprecated("This class will be removed in the future; use `AbbrTreeprocessor` instead.") |
| 184 | class AbbrInlineProcessor(InlineProcessor): |
| 185 | """ Abbreviation inline pattern. """ |
| 186 | |
| 187 | def __init__(self, pattern: str, title: str): |
| 188 | super().__init__(pattern) |
| 189 | self.title = title |
| 190 | |
| 191 | def handleMatch(self, m: re.Match[str], data: str) -> tuple[etree.Element, int, int]: |
| 192 | abbr = etree.Element('abbr') |
| 193 | abbr.text = AtomicString(m.group('abbr')) |
| 194 | abbr.set('title', self.title) |
| 195 | return abbr, m.start(0), m.end(0) |
| 196 | |
| 197 | |
| 198 | def makeExtension(**kwargs): # pragma: no cover |
nothing calls this directly
no outgoing calls
no test coverage detected