We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db82b6c commit f457e20Copy full SHA for f457e20
1 file changed
Lib/textwrap.py
@@ -291,7 +291,7 @@ def _wrap_chunks(self, chunks):
291
del chunks[-1]
292
293
while chunks:
294
- l = len(chunks[-1])
+ l = self.text_len(chunks[-1])
295
296
# Can at least squeeze this chunk onto the current line.
297
if cur_len + l <= width:
@@ -304,7 +304,7 @@ def _wrap_chunks(self, chunks):
304
305
# The current line is full, and the next chunk is too big to
306
# fit on *any* line (not just this one).
307
- if chunks and len(chunks[-1]) > width:
+ if chunks and self.text_len(chunks[-1]) > width:
308
self._handle_long_word(chunks, cur_line, cur_len, width)
309
cur_len = sum(map(self.text_len, cur_line))
310
0 commit comments