Rudimentary attempt to escape special RST characters to appear as plain text.
(text: str)
| 72 | |
| 73 | |
| 74 | def escape_rst(text: str) -> str: |
| 75 | """Rudimentary attempt to escape special RST characters to appear as |
| 76 | plain text.""" |
| 77 | text = ( |
| 78 | text.replace("*", "\\*") |
| 79 | .replace("<", "\\<") |
| 80 | .replace(">", "\\>") |
| 81 | .replace("`", "\\`") |
| 82 | ) |
| 83 | text = re.sub(r"_\b", "", text) |
| 84 | return text |
| 85 | |
| 86 | |
| 87 | def project_response_with_refresh( |