mirror of
https://github.com/Textualize/rich.git
synced 2025-08-04 18:18:22 +00:00
increse coverage to 100%
This commit is contained in:
parent
f07710da60
commit
0fae28ca90
2 changed files with 44 additions and 3 deletions
|
@ -15,10 +15,10 @@ def replace_link_ids(render: str) -> str:
|
|||
return re_link_ids.sub("id=0;foo\x1b", render)
|
||||
|
||||
|
||||
def render(renderable: RenderableType) -> str:
|
||||
def render(renderable: RenderableType, no_wrap: bool = False) -> str:
|
||||
console = Console(
|
||||
width=100, file=io.StringIO(), color_system="truecolor", legacy_windows=False
|
||||
)
|
||||
console.print(renderable)
|
||||
console.print(renderable, no_wrap=no_wrap)
|
||||
output = replace_link_ids(console.file.getvalue())
|
||||
return output
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue