Skip to content

Commit f457e20

Browse files
committed
fix missing len occurences
1 parent db82b6c commit f457e20

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/textwrap.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def _wrap_chunks(self, chunks):
291291
del chunks[-1]
292292

293293
while chunks:
294-
l = len(chunks[-1])
294+
l = self.text_len(chunks[-1])
295295

296296
# Can at least squeeze this chunk onto the current line.
297297
if cur_len + l <= width:
@@ -304,7 +304,7 @@ def _wrap_chunks(self, chunks):
304304

305305
# The current line is full, and the next chunk is too big to
306306
# fit on *any* line (not just this one).
307-
if chunks and len(chunks[-1]) > width:
307+
if chunks and self.text_len(chunks[-1]) > width:
308308
self._handle_long_word(chunks, cur_line, cur_len, width)
309309
cur_len = sum(map(self.text_len, cur_line))
310310

0 commit comments

Comments
 (0)