Remove ANSI color codes from text
(text: str)
| 38 | |
| 39 | |
| 40 | def strip_ansi_codes(text: str) -> str: |
| 41 | """Remove ANSI color codes from text""" |
| 42 | ansi_escape = re.compile(r'\x1b\[[0-9;]*m') |
| 43 | return ansi_escape.sub('', text) |
| 44 | |
| 45 | |
| 46 | def escape_rich_markup(text: str) -> str: |
no outgoing calls
no test coverage detected