Merge pull request #2852 from Textualize/fix-console-markup-live

fix markup in console live
This commit is contained in:
Will McGugan 2023-03-04 16:17:28 +00:00 committed by GitHub
commit 2f502c29fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed duplicate output in Jupyter https://github.com/Textualize/rich/pulls/2804 - Fixed duplicate output in Jupyter https://github.com/Textualize/rich/pulls/2804
- Filter ANSI character-encoding-change codes in `Text.from_ansi` parser - Filter ANSI character-encoding-change codes in `Text.from_ansi` parser
- Fixes traceback failing when a frame filename is unreadable https://github.com/Textualize/rich/issues/2821 - Fixes traceback failing when a frame filename is unreadable https://github.com/Textualize/rich/issues/2821
- Fix for live update rendering console markup https://github.com/Textualize/rich/issues/2726
### Added ### Added

View File

@ -210,6 +210,8 @@ class Live(JupyterMixin, RenderHook):
renderable (RenderableType): New renderable to use. renderable (RenderableType): New renderable to use.
refresh (bool, optional): Refresh the display. Defaults to False. refresh (bool, optional): Refresh the display. Defaults to False.
""" """
if isinstance(renderable, str):
renderable = self.console.render_str(renderable)
with self._lock: with self._lock:
self._renderable = renderable self._renderable = renderable
if refresh: if refresh: