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