Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Textualize/rich
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v13.5.0
Choose a base ref
...
head repository: Textualize/rich
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v13.5.1
Choose a head ref
  • 10 commits
  • 6 files changed
  • 2 contributors

Commits on Jul 30, 2023

  1. Copy the full SHA
    956bfa5 View commit details
  2. Copy the full SHA
    a6aebd5 View commit details
  3. Copy the full SHA
    2dd2daa View commit details
  4. Update FUNDING.yml

    willmcgugan authored Jul 30, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5633a67 View commit details

Commits on Jul 31, 2023

  1. Copy the full SHA
    33fcafe View commit details
  2. Merge pull request #3067 from LukeSavefrogs/master

    Allow tilde in URL (fixes #3057)
    willmcgugan authored Jul 31, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2d035d1 View commit details
  3. Merge pull request #3069 from Textualize/willmcgugan-patch-1

    Update FUNDING.yml
    willmcgugan authored Jul 31, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    27a5a37 View commit details
  4. version bump

    willmcgugan committed Jul 31, 2023
    Copy the full SHA
    0e9ce52 View commit details
  5. changelog

    willmcgugan committed Jul 31, 2023
    Copy the full SHA
    aabfd16 View commit details
  6. Merge pull request #3070 from Textualize/bump1351

    version bump
    willmcgugan authored Jul 31, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3fa3d36 View commit details
Showing with 20 additions and 3 deletions.
  1. +0 −1 .github/FUNDING.yml
  2. +7 −0 CHANGELOG.md
  3. +1 −0 CONTRIBUTORS.md
  4. +1 −1 pyproject.toml
  5. +1 −1 rich/highlighter.py
  6. +10 −0 tests/test_highlighter.py
1 change: 0 additions & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# These are supported funding model platforms

ko_fi: textualize
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [13.5.1] - 2023-29-31

### Fixed

- Fix tilde character (`~`) not included in link regex when printing to console https://github.com/Textualize/rich/issues/3057

## [13.5.0] - 2023-07-29

@@ -1983,6 +1988,8 @@ Major version bump for a breaking change to `Text.stylize signature`, which corr

- First official release, API still to be stabilized

[13.5.1]: https://github.com/textualize/rich/compare/v13.5.0...v13.5.1
[13.5.0]: https://github.com/textualize/rich/compare/v13.4.2...v13.5.0
[13.4.2]: https://github.com/textualize/rich/compare/v13.4.1...v13.4.2
[13.4.1]: https://github.com/textualize/rich/compare/v13.4.0...v13.4.1
[13.4.0]: https://github.com/textualize/rich/compare/v13.3.5...v13.4.0
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -51,6 +51,7 @@ The following people have contributed to the development of Rich:
- [Clément Robert](https://github.com/neutrinoceros)
- [Brian Rutledge](https://github.com/bhrutledge)
- [Tushar Sadhwani](https://github.com/tusharsadhwani)
- [Luca Salvarani](https://github.com/LukeSavefrogs)
- [Paul Sanders](https://github.com/sanders41)
- [Tim Savage](https://github.com/timsavage)
- [Anthony Shaw](https://github.com/tonybaloney)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
name = "rich"
homepage = "https://github.com/Textualize/rich"
documentation = "https://rich.readthedocs.io/en/latest/"
version = "13.5.0"
version = "13.5.1"
description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal"
authors = ["Will McGugan <willmcgugan@gmail.com>"]
license = "MIT"
2 changes: 1 addition & 1 deletion rich/highlighter.py
Original file line number Diff line number Diff line change
@@ -98,7 +98,7 @@ class ReprHighlighter(RegexHighlighter):
r"(?P<number>(?<!\w)\-?[0-9]+\.?[0-9]*(e[-+]?\d+?)?\b|0x[0-9a-fA-F]*)",
r"(?P<path>\B(/[-\w._+]+)*\/)(?P<filename>[-\w._+]*)?",
r"(?<![\\\w])(?P<str>b?'''.*?(?<!\\)'''|b?'.*?(?<!\\)'|b?\"\"\".*?(?<!\\)\"\"\"|b?\".*?(?<!\\)\")",
r"(?P<url>(file|https|http|ws|wss)://[-0-9a-zA-Z$_+!`(),.?/;:&=%#]*)",
r"(?P<url>(file|https|http|ws|wss)://[-0-9a-zA-Z$_+!`(),.?/;:&=%#~]*)",
),
]

10 changes: 10 additions & 0 deletions tests/test_highlighter.py
Original file line number Diff line number Diff line change
@@ -133,6 +133,16 @@ def test_wrong_type():
(" https://example.org ", [Span(1, 20, "repr.url")]),
(" http://example.org ", [Span(1, 19, "repr.url")]),
(" http://example.org/index.html ", [Span(1, 30, "repr.url")]),
(" http://example.org/index.html#anchor ", [Span(1, 37, "repr.url")]),
(
" http://example.org/index.html?param1=value1 ",
[
Span(31, 37, "repr.attrib_name"),
Span(38, 44, "repr.attrib_value"),
Span(1, 44, "repr.url"),
],
),
(" http://example.org/~folder ", [Span(1, 27, "repr.url")]),
("No place like 127.0.0.1", [Span(14, 23, "repr.ipv4")]),
("''", [Span(0, 2, "repr.str")]),
("'hello'", [Span(0, 7, "repr.str")]),