Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8b7eef3

Browse files
committed
Issue 1859: Document that textwrap does not break on \n
Merged from 86717
1 parent 8d4a932 commit 8b7eef3

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Doc/library/textwrap.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,13 @@ indentation from strings that have unwanted whitespace to the left of the text.
117117
each tab character will be replaced by a single space, which is *not*
118118
the same as tab expansion.
119119

120+
.. note::
121+
122+
If :attr:`replace_whitespace` is false, newlines may appear in the
123+
middle of a line and cause strange output. For this reason, text should
124+
be split into paragraphs (using :meth:`str.splitlines` or similar)
125+
which are wrapped separately.
126+
120127

121128
.. attribute:: drop_whitespace
122129

0 commit comments

Comments
 (0)