Commit Graph

3868 Commits

Author SHA1 Message Date
Darren Burns 59b1aca63b
Fix double-width characters disappearing when wrapping (#3180)
* Update docstring for `Text.wrap`s width parameter to indicate that it's referring to the number of *single-width* characters.

Also a small addition to the gitignore file.

* Working on double width wrapping fixes

* Chop cells to fit to width

* Fix folding when theres already text on line

* Update wrapping logic to fix issues with CJK charcters disappearing when the "fold" location sat *within* a double-width character. Ensure we retain browser logic of: if there is no space on the current line, move to a new line, and if theres not enough space on the entire new line, fold the text over multiple lines at appropriate locations.

* Remove old TODO comments

* Add regression test note

* Rename function to avoid breaking change

* Update CHANGELOG

* Remove old comment that is no longer relevant

* Cover off some wrapping edge cases

* Adding docstrings to tests explaining their purpose

* Renaming a local, function scope function alias

* Update rich/_wrap.py

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* PR feedback

* Testing wrapping with trailing and leading whitespace

* Improve docstring wording

---------

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-11-14 10:03:54 +00:00
Darren Burns b32e42bda0
Fix issue with trailing whitespace (#3195)
* chore: upgrade all pre-commit hooks to latest version

* chore: add trailing-whitespace pre-commit hook

* refactor: Avoid trailing whitespace in box definitions

* docs: Add Robin Bowes as a contributor

---------

Co-authored-by: Robin Bowes <robin.bowes@yo61.com>
2023-11-08 11:43:38 +00:00
xymy 50d2a457c8
Fix typing for FloatPrompt (#3151)
Co-authored-by: Darren Burns <darrenb900@gmail.com>
2023-11-07 18:02:06 +00:00
Henry Mai 0177b03700
Black formatting (#3035)
* fix: minor black formatting

* style: update CONTRIBUTORS.md

* fix: more black formatting

Default black with no arguments provided

---------

Co-authored-by: Darren Burns <darrenburns@users.noreply.github.com>
2023-11-07 17:57:21 +00:00
plotski 7a168a27c5
[docs] Fix typos and other small stuff (#3094)
* [docs.text] Fix typo ("follow" -> "following")

* [docs.text] Fix ANSI/assemble examples

* [rich.pretty] Make `python -m rich.pretty` from the examples work

* [docs.progress] Fix typo ("updated" -> "setting")

* [docs.progress] Fix reference to cp_progress.py

* [docs.table] Fix typo ("show above" -> "shown above")

* [docs.table] Add reference to "Padding" for "padding" argument

---------

Co-authored-by: Anonymous <you@example.com>
2023-11-07 17:37:25 +00:00
Daniel Mills e76f3c3ea7
Update pre-commit hooks (#3113)
Fixes #3112
2023-11-07 17:07:05 +00:00
AaronBeaudoin 92e7164773
Fix #3104 (#3105)
* Fix #3104

* Fixing tests to account for new inline styles in HTML export

* Update changelog

* Add Aaron Beaudoin to contributors file.

---------

Co-authored-by: Darren Burns <darrenb900@gmail.com>
2023-11-07 17:04:31 +00:00
Will McGugan 9f620dc50c
Merge pull request #3191 from Textualize/assorted-docs-and-tidying
Various docstring fixes, removing unused variables
2023-11-07 16:22:13 +00:00
Ekin Aksu 238cf7bd98
Update README.tr.md (#3162)
Co-authored-by: Darren Burns <darrenb900@gmail.com>
2023-11-07 16:16:24 +00:00
Pedro Aaron c82777bd50
✏️ Fix micro-typo in README.es.md (#3145)
* ✏️ Fix micro-typo in` README.es.md`

* Update CONTRIBUTORS.md

---------

Co-authored-by: Pedro Luis Aaron Robles <Pedro.Luis.Aaron.Robles@kyndryl.com>
Co-authored-by: Darren Burns <darrenburns@users.noreply.github.com>
2023-11-07 15:55:58 +00:00
Darren Burns b97abfcacc
Add missing Panel.fit parameters (#3192)
* Add parameters missing from Panel.fit

* Update CHANGELOG
2023-11-07 15:48:40 +00:00
Darren Burns cb211d5b89 Fix docstring typos 2023-11-07 13:45:51 +00:00
dependabot[bot] 21c0f25869
Bump actions/checkout from 2 to 4 (#3122)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-07 12:03:59 +00:00
Darren Burns 6fd3734f12 Improve wording in a docstring 2023-11-07 11:27:56 +00:00
Darren Burns b44fd1b337 Various docstring fixes, removing unused variables 2023-11-07 11:23:28 +00:00
Darren Burns c7d6215cfe
Fix a few typos in the repository that were resulting in the codespel… (#3181) 2023-11-01 17:04:37 +00:00
Will McGugan dfea426131
Merge pull request #3178 from DavdTheItGuy/patch-1
Corrected Typo in Portuguese README
2023-10-31 13:54:31 +00:00
David Samuel 712aae3cfe
Corrected Typo in Portuguese README
I fixed a minor typo in the Portuguese version of the README file. The word "Markdowm" should be "Markdown". This improves the clarity of the document. I am searching for another typo, but i can't find other typo, this is good 😃.  
I have a issue asking for fix the typo [here](https://github.com/Textualize/rich/issues/3172).
2023-10-31 10:42:39 -03:00
Bernhard Wagner 01d01ed5ee
Update progress.py: doc: Progress.default_columns -> Progress.get_def… (#3170)
* Update progress.py: doc: Progress.default_columns -> Progress.get_default_columns

Update progress.py: doc: 
Progress.default_columns -> Progress.get_default_columns

* Update CONTRIBUTORS.md

add bwagner (myself) to contributors
2023-10-27 12:59:40 +01:00
Will McGugan e9f75c9912 Merge branch 'py312' 2023-09-30 15:09:52 +01:00
Will McGugan 35b64f1237
Merge pull request #3139 from Textualize/py312
enable py312
2023-09-30 15:08:54 +01:00
Will McGugan c8ff546416 version bump 2023-09-30 14:45:34 +01:00
Will McGugan 3f8c4af451 tests for 3.12 2023-09-30 14:35:17 +01:00
Will McGugan ef90daf98f enable py312 2023-09-30 14:18:35 +01:00
Will McGugan ec91917deb changelog 2023-09-17 16:50:57 +01:00
Will McGugan 5360fe6fe4 version bump 2023-09-17 16:50:26 +01:00
Will McGugan e0d3aee1ec
Merge pull request #3132 from Textualize/fix-markdown-on-light
fix markdown on light
2023-09-17 16:48:46 +01:00
Will McGugan db07a2aad2 Restore text 2023-09-17 16:43:02 +01:00
Will McGugan 44e36aaf6f Add default lexer 2023-09-17 16:41:40 +01:00
Will McGugan 32ec768f4e fix test 2023-09-17 16:38:44 +01:00
Will McGugan f6eca21a9b fix markdown on light 2023-09-17 16:36:06 +01:00
Will McGugan a972ca0552 changelog 2023-09-17 15:56:44 +01:00
Will McGugan bef0e50b63
Merge pull request #3130 from Textualize/fix-table-inline-styles
Fix markdown table rendering issue with inline styles/links
2023-09-17 15:56:07 +01:00
Rodrigo Girão Serrão e30b822ecc
Fix markdown table rendering issue.
The table data elements were not interacting well with inline styles (in the rich sense) and the table data element would have its content overridden every time we found another excerpt of text with a different style.
2023-09-13 13:37:25 +01:00
Rodrigo Girão Serrão 51603befe4
Add regression tests for #3115. 2023-09-13 13:32:32 +01:00
Will McGugan 720800e693 fix tab size issue 2023-08-01 16:44:57 +01:00
Will McGugan 4037906f2b
Merge pull request #3071 from ThiefMaster/patch-1
Fix nonsensical date in changelog
2023-07-31 11:48:36 +01:00
Adrian e66d43baea
Fix nonsensical date in changelog 2023-07-31 12:26:09 +02:00
Will McGugan 3fa3d36568
Merge pull request #3070 from Textualize/bump1351
version bump
2023-07-31 11:05:40 +01:00
Will McGugan aabfd160c7 changelog 2023-07-31 11:00:57 +01:00
Will McGugan 0e9ce527e6 version bump 2023-07-31 10:59:44 +01:00
Will McGugan 27a5a370ed
Merge pull request #3069 from Textualize/willmcgugan-patch-1
Update FUNDING.yml
2023-07-31 10:53:23 +01:00
Will McGugan 2d035d116e
Merge pull request #3067 from LukeSavefrogs/master
Allow tilde in URL (fixes #3057)
2023-07-31 10:53:03 +01:00
Luca Salvarani 33fcafe6ec Format `test_highlighter.py` using `black` 2023-07-31 08:26:15 +00:00
Will McGugan 5633a67279
Update FUNDING.yml 2023-07-30 17:07:08 +01:00
Luca Salvarani 2dd2daa4f6 tests(highlighter): Add more tests for `repr.url` 2023-07-30 11:35:46 +00:00
Luca Salvarani a6aebd5ecf tests(highlighter): Add test for tilde in url 2023-07-30 11:32:30 +00:00
Luca Salvarani 956bfa5fe5 Allow tilde in URL (fixes #3057) 2023-07-30 00:13:56 +00:00
Will McGugan 1ad6f73a4d
Merge pull request #3066 from Textualize/bump1350
version bump 13.5.0
2023-07-29 17:16:47 +01:00
Will McGugan 7e400fce59 version bump 2023-07-29 17:07:11 +01:00