Return text with backslash escapes undone (backslashes are restored).
(self, text: str)
| 548 | return util.INLINE_PLACEHOLDER_RE.sub(get_stash, text) |
| 549 | |
| 550 | def backslash_unescape(self, text: str) -> str: |
| 551 | """ Return text with backslash escapes undone (backslashes are restored). """ |
| 552 | try: |
| 553 | RE = self.md.treeprocessors['unescape'].RE |
| 554 | except KeyError: # pragma: no cover |
| 555 | return text |
| 556 | |
| 557 | def _unescape(m: re.Match[str]) -> str: |
| 558 | return chr(int(m.group(1))) |
| 559 | |
| 560 | return RE.sub(_unescape, text) |
| 561 | |
| 562 | |
| 563 | class EvaluatedText(str): |