If the character matched by `group(1)` of a pattern is in [`ESCAPED_CHARS`][markdown.Markdown.ESCAPED_CHARS] then return the integer representing the character's Unicode code point (as returned by [`ord`][]) wrapped in [`util.STX`][markdown.util.STX] and [`util.ETX`][markdow
(self, m: re.Match[str], data: str)
| 318 | """ Return an escaped character. """ |
| 319 | |
| 320 | def handleMatch(self, m: re.Match[str], data: str) -> tuple[str | None, int, int]: |
| 321 | """ |
| 322 | If the character matched by `group(1)` of a pattern is in [`ESCAPED_CHARS`][markdown.Markdown.ESCAPED_CHARS] |
| 323 | then return the integer representing the character's Unicode code point (as returned by [`ord`][]) wrapped |
| 324 | in [`util.STX`][markdown.util.STX] and [`util.ETX`][markdown.util.ETX]. |
| 325 | |
| 326 | If the matched character is not in [`ESCAPED_CHARS`][markdown.Markdown.ESCAPED_CHARS], then return `None`. |
| 327 | """ |
| 328 | |
| 329 | char = m.group(1) |
| 330 | if char in self.md.ESCAPED_CHARS: |
| 331 | return '{}{}{}'.format(util.STX, ord(char), util.ETX), m.start(0), m.end(0) |
| 332 | else: |
| 333 | return None, m.start(0), m.end(0) |
| 334 | |
| 335 | |
| 336 | class SimpleTagPattern(Pattern): # pragma: no cover |
nothing calls this directly
no outgoing calls
no test coverage detected