Skip to content

Commit 56be759

Browse files
committed
Fix order of re.sub parameters
1 parent 6517434 commit 56be759

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/textwrap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def _handle_long_word(self, reversed_chunks, cur_line, cur_len, width):
243243

244244
def _str_len_without_ansi_escape_codes(self, s):
245245
"""Return the length of string s without ANSI escape codes."""
246-
return len(self.ansi_escape_re.sub(s, ""))
246+
return len(self.ansi_escape_re.sub("", s))
247247

248248
def _wrap_chunks(self, chunks):
249249
"""_wrap_chunks(chunks : [string]) -> [string]

0 commit comments

Comments
 (0)