pypi rich 7.0.0
Syntax improvements

latest releases: 13.7.1, 13.7.0, 13.6.0...
3 years ago

The main feature of this release was a way of display syntax highlighting with only standard colors (i.e. the colors you can configure in the terminal), which you can do by setting the theme to "ansi_dark" or "ansi_light". The other themes are generally prettier (IMHO) but use colors defined by the theme, and not by the user's settings.

When testing the above I also made some optimizations which benefit all the Rich output. You may only notice this if you are syntax highlighting large XML files, but its faster now.

This is a major release as there were a small number of signature changes. Most people won't be impacted, but please review the release notes below.

Screen Shot 2020-09-18 at 16 35 46

[7.0.0] - 2020-09-18

Added

  • New ansi_dark and ansi_light themes
  • Added Text.append_tokens for fast appending of string + Style pairs
  • Added Text.remove_suffix
  • Added Text.append_tokens

### Changed

  • Text.tabs_to_spaces was renamed to Text.expand_tabs, which works in place rather than returning a new instance
  • Renamed Column.index to Column._index
  • Optimized Style.combine and Style.chain
  • Optimized text rendering by fixing internal cache mechanism
  • Optimized hash generation for Styles

Don't miss a new rich release

NewReleases is sending notifications on new releases.