def escape_rst(string: str) -> str:
    """Escape RST symbols and disable Sphinx smart quotes."""
    return (
        string.replace("\\", "\\\\")
        .replace("*", "\\*")
        .replace("|", "\\|")
        .replace("`", "\\`")
        .replace("'", "\\'")
        .replace('"', '\\"')
    )