Escape
escape ¶
ESCAPED_CHARS = '\\\\`*_{}[]()#+\\-.!' module-attribute ¶
ESCAPED_CHARS_RE = re.compile(f'([{re.escape(ESCAPED_CHARS)}])') module-attribute ¶
UNESCAPED_CHARS_RE = re.compile(f'\\([{re.escape(ESCAPED_CHARS)}])') module-attribute ¶
escape(text: str) -> str ¶
Escape text.
unescape(text: str) -> str ¶
Unescape text.