Skip to content

Commit

Permalink
Add CHANGELOG entry for parsing escape codes in Pretty reprs
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenburns committed Aug 16, 2022
1 parent b04634e commit 98d890b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Parse ANSI escape sequences in pretty repr https://github.com/Textualize/rich/pull/2470

### Fixed

- Fix NO_COLOR support on legacy Windows https://github.com/Textualize/rich/pull/2458
Expand Down
8 changes: 7 additions & 1 deletion rich/pretty.py
Original file line number Diff line number Diff line change
Expand Up @@ -1007,4 +1007,10 @@ class StockKeepingUnit(NamedTuple):

from rich import print

print(Pretty(data, indent_guides=True, max_string=20))
# print(Pretty(data, indent_guides=True, max_string=20))

class Thing:
def __repr__(self) -> str:
return "Hello\x1b[38;5;239m World!"

print(Pretty(Thing()))

0 comments on commit 98d890b

Please sign in to comment.