Skip to content

Commit

Permalink
Merge pull request #2852 from Textualize/fix-console-markup-live
Browse files Browse the repository at this point in the history
fix markup in console live
  • Loading branch information
willmcgugan committed Mar 4, 2023
2 parents c5f0890 + 6796675 commit 2f502c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
- 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
- Fix for live update rendering console markup https://github.com/Textualize/rich/issues/2726

### Added

Expand Down
2 changes: 2 additions & 0 deletions rich/live.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ def update(self, renderable: RenderableType, *, refresh: bool = False) -> None:
renderable (RenderableType): New renderable to use.
refresh (bool, optional): Refresh the display. Defaults to False.
"""
if isinstance(renderable, str):
renderable = self.console.render_str(renderable)
with self._lock:
self._renderable = renderable
if refresh:
Expand Down

0 comments on commit 2f502c2

Please sign in to comment.