diff options
Diffstat (limited to 'Lib/textwrap.py')
-rw-r--r-- | Lib/textwrap.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/textwrap.py b/Lib/textwrap.py index f5d1915..ff5f7ef 100644 --- a/Lib/textwrap.py +++ b/Lib/textwrap.py @@ -237,8 +237,9 @@ class TextWrapper: converted to space. """ text = self._munge_whitespace(text) - if len(text) <= self.width: - return [text] + indent = self.initial_indent + if len(text) + len(indent) <= self.width: + return [indent + text] chunks = self._split(text) if self.fix_sentence_endings: self._fix_sentence_endings(chunks) |