Commit graph

81 commits

Author SHA1 Message Date
Will McGugan
655b5210cb test fixes 2025-10-09 09:35:09 +01:00
Will McGugan
b5d063ca16
Merge branch 'master' into highlight_regex_compiled 2024-09-30 15:39:33 +01:00
Will McGugan
f2ee29531b fix infinite loop in append 2024-09-06 10:32:01 +01:00
Samuel J. Woodward
65fcf28128 Tweaks required by black 2024-08-26 16:40:22 -04:00
Will McGugan
5cb1035cb7 added test 2024-08-26 16:12:14 +01:00
Samuel J. Woodward
794b6c4241 Use of Text.highlight_regex now tests against receiving a str or a compiled regular expression 2024-08-26 10:02:37 -04:00
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
Will McGugan
40332a52e1 typing in tests 2023-07-28 22:13:32 +01:00
Will McGugan
482dcee134 tests 2023-07-28 21:54:04 +01:00
Will McGugan
fa0a62a72b test double width, optimization 2023-07-28 19:23:51 +01:00
Will McGugan
29dfa0e5c8 tests 2023-07-28 09:37:01 +01:00
Will McGugan
7a15d62e44 refactor of tab_size 2023-07-28 09:24:13 +01:00
Will McGugan
e7bede1425 added text 2022-09-23 15:02:55 +01:00
Will McGugan
0852511024 replace willmcgugan with textualize 2022-09-19 11:27:11 +01:00
Darren Burns
0dc3985ea8
Fix wrapping issue 2022-05-25 16:25:10 +01:00
Darren Burns
34a0c50421
Add some CJK wrapping test cases 2022-05-25 12:59:45 +01:00
Darren Burns
f70414a783
Remove duplicate test 2022-05-25 12:50:06 +01:00
Darren Burns
ee60bc13ba
Fix text wrapping edge case 2022-05-25 12:43:48 +01:00
Darren Burns
9174059949
Add xfail test for text wrapping issue 2022-05-25 10:36:36 +01:00
Darren Burns
44d32b2b4a
Add test to catch wrapping edgecase 2022-05-24 17:18:54 +01:00
Darren Burns
7e96597f65
Rename test 2022-05-24 17:06:24 +01:00
Darren Burns
68faf4f344
Add test case to ensure wrapping when length greater than available width 2022-05-24 17:05:22 +01:00
Darren Burns
7975c563e1
Fix numerous typos in tests 2022-05-24 13:26:40 +01:00
Will McGugan
9faafa0ab1 fix for ansi issue 2022-03-26 14:40:20 +00:00
Will McGugan
f7aa3fb78e fix for ansi issue 2022-03-26 12:59:20 +00:00
Wasi Master
f06da9b94c
Format with black 2022-03-22 20:17:21 +06:00
Wasi Master
fc292780aa
Add test for the end parameter 2022-03-22 20:13:30 +06:00
Will McGugan
1c543b746d tests for markup property 2021-12-11 16:41:19 +00:00
Will McGugan
32eb5465ea from_ansi method 2021-11-28 16:22:51 +00:00
Nicolas Simonds
62ead7eded Add a Text.from_ansi helper method
Add a simple little helper to run `AnsiDecoder.decode_line` over
"pre-cooked" inputs.

Fixes issue: #1670
2021-11-17 13:25:39 -08:00
Will McGugan
ff43bae4eb .on methods and name changes 2021-07-28 09:10:23 +01:00
Will McGugan
c323d3a6ef test new meta methods 2021-07-19 21:34:41 +01:00
Will McGugan
3c08809b9e test fixes 2021-05-06 15:13:40 +01:00
Will McGugan
be5e9dca2d rich measure 2021-03-25 21:08:36 +00:00
Will McGugan
2f752afaa9 style optimization 2021-03-01 19:42:00 +00:00
Will McGugan
122b8131bb live refactor 2021-02-06 11:49:54 +00:00
Will McGugan
c1055cecda coverage 2021-01-23 14:47:35 +00:00
Will McGugan
449c1fbb29 optimizations for traceback 2021-01-23 14:30:54 +00:00
Will McGugan
c12ca86b7b formatting 2020-12-10 17:11:01 +00:00
Will McGugan
be47b3f899 status tests 2020-12-08 12:57:06 +00:00
Will McGugan
396adbce32 mypy and formatting 2020-10-22 21:54:45 +01:00
Will McGugan
be1b14d42b indentaion guides 2020-10-22 21:17:03 +01:00
Will McGugan
22bdafdd3e optimizations 2020-09-18 11:37:37 +01:00
Will McGugan
60e813379b new black 2020-08-28 12:56:18 +01:00
Will McGugan
ce82bb67bb overflow ignore 2020-08-12 21:13:39 +01:00
Will McGugan
1c270a46e8 added crop option 2020-08-12 19:00:51 +01:00
Will McGugan
5a9f0dcc36 append text test 2020-08-08 18:22:38 +01:00
Will McGugan
70d43d7c92 prompt fix 2020-07-23 16:49:07 +01:00
Will McGugan
57f6215596 adde Text.styled 2020-07-22 17:11:06 +01:00
Hedy Li
670ebe0ec5 add test for Text.rstrip_end() 2020-07-15 16:50:13 +08:00