mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Use render instead of render_lines in Opacity, add tests
This commit is contained in:
@@ -19,6 +19,7 @@ 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, no_wrap=no_wrap)
|
||||
output = replace_link_ids(console.file.getvalue())
|
||||
with console.capture() as capture:
|
||||
console.print(renderable, no_wrap=no_wrap, end="")
|
||||
output = replace_link_ids(capture.get())
|
||||
return output
|
||||
|
||||
Reference in New Issue
Block a user