Skip to content

Commit cdbf503

Browse files
Fix stripping markup from colourless output.
* check_pre_commit_config_frozen.py (strip_rich_markup)
1 parent 012055f commit cdbf503

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

check_pre_commit_config_frozen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ async def run(self, content: str, file: str) -> Tuple[str, List[Complaint]]:
959959
def strip_rich_markup(string: str):
960960
"""Remove the markup for the rich library from a string."""
961961
string = regex_rich_markup_tag.sub("", string)
962-
string = regex_rich_markup_escape.sub(lambda m: m[0], string)
962+
string = regex_rich_markup_escape.sub("[", string)
963963
return string
964964

965965

0 commit comments

Comments
 (0)