fix invalid escapes

This commit is contained in:
wim glenn 2022-08-11 21:03:13 -05:00
parent 5d3f600f43
commit 90a7224ee6
3 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@ import re
from rich.console import Console, RenderableType
re_link_ids = re.compile(r"id=[\d\.\-]*?;.*?\x1b")
re_link_ids = re.compile(r"id=[\d.\-]*?;.*?\x1b")
def replace_link_ids(render: str) -> str:

View File

@ -144,7 +144,7 @@ def test_markup_error():
def test_markup_escape():
result = str(render("[dim white]\[url=[/]"))
result = str(render("[dim white][url=[/]"))
assert result == "[url="

View File

@ -49,7 +49,7 @@ def test_handler():
"" + (" " * 98) + "",
)
for frame_start in re.finditer(
"^│ .+rich/tests/test_traceback\.py:",
"^│ .+rich/tests/test_traceback.py:",
rendered_exception,
flags=re.MULTILINE,
):