mirror of
https://github.com/python/cpython.git
synced 2025-11-01 06:01:29 +00:00
[3.14] gh-139065: Fix trailing space before long word in textwrap (GH-139070) (GH-139902)
Fix trailing space before a wrapped long word if the line length with
a space is exactly "width".
(cherry picked from commit 1c598e0436)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
08738ce521
commit
ade6dea24b
3 changed files with 5 additions and 3 deletions
|
|
@ -605,7 +605,7 @@ def test_break_long(self):
|
|||
# bug 1146. Prevent a long word to be wrongly wrapped when the
|
||||
# preceding word is exactly one character shorter than the width
|
||||
self.check_wrap(self.text, 12,
|
||||
['Did you say ',
|
||||
['Did you say',
|
||||
'"supercalifr',
|
||||
'agilisticexp',
|
||||
'ialidocious?',
|
||||
|
|
@ -633,7 +633,7 @@ def test_nobreak_long(self):
|
|||
|
||||
def test_max_lines_long(self):
|
||||
self.check_wrap(self.text, 12,
|
||||
['Did you say ',
|
||||
['Did you say',
|
||||
'"supercalifr',
|
||||
'agilisticexp',
|
||||
'[...]'],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue