Console markup syntax has been tweaked to not overlap with Python data structures.
Prior to 5.0.0 if you stringified a list it would typically be removed from the output as Rich would interpret it as a markup tag. This surprised people when printing lists in an f-string.
For instance, prior to 5.0.0 the following would not print as you might expect:
This change required some changes to the console markup syntax, which is the reason for the major version bump.
You can no longer use a number between 0 and 255 to provide a color, now it must be wrapped with color(NUMBER). So "[4]Red[/]" becomes "[color(4)]Red[/]". From an extensive search of Github, most people never used this syntax anyway and would prefer to use friendly color names.
Additionally escaping has changed. Prior to 5.0.0 you could escape square brackets by doubling them up. From 5.0.0 you can escape a tag with backslash.
[5.0.0] - 2020-08-02
Changed
Change to console markup syntax to not parse Python structures as markup, i.e. [1,2,3] is treated as a literal, not a tag.
Standard color numbers syntax has changed to "color(<number>)" so that [5] (for example) is considered a literal.
Markup escape method has changed from double brackets to preceding with a backslash, so foo[[]] would be foo\[bar]
Implemented auto-detection and color rendition of 16-color mode
[4.1.0] - 2020-07-26
Changed
Optimized progress.track for very quick iterations
Force default size of 80x25 if get_terminal_size reports size of 0,0
[4.0.0] - 2020-07-23
Major version bump for a breaking change to Text.stylize signature, which corrects a minor but irritating API wart. The style now comes first and the start and end offsets default to the entire text. This allows for text.stylize_all(style) to be replaced with text.stylize(style). The start and end offsets now support negative indexing, so text.stylize("bold", -1) makes the last character bold.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot will merge this PR once CI passes on it, as requested by @hedythedev.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)
Updates the requirements on rich to permit the latest version.
Release notes
Sourced from rich's releases.
Changelog
Sourced from rich's changelog.
Commits
1ffbd44
changelogf06001c
Merge pull request #199 from willmcgugan/markup-color2c16eb0
relative imports7da3ee6
markup syntax1f09278
color parsingfe57ff6
words977dbcf
Merge pull request #198 from S0Ulle33/masterc30dcbe
Fix doc2b0ad53
introc0ee115
intro docDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot will merge this PR once CI passes on it, as requested by @hedythedev.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired)