Serhiy Storchaka
fbe04b68af
Issue #21827 : Fixed textwrap.dedent() for the case when largest common
...
whitespace is a substring of smallest leading whitespace.
Based on patch by Robert Li.
2015-10-28 21:39:36 +02:00
Serhiy Storchaka
c811328e44
Escaped backslashes in docstrings.
2015-04-03 18:12:32 +03:00
Martin v. Löwis
ed11a5d018
Issue #8767 : Restore building with --disable-unicode.
...
Original patch by Stefano Taschini.
2012-05-20 10:42:17 +02:00
Georg Brandl
195261f823
Optimize optimization and fix method name in docstring.
2009-09-18 16:19:56 +00:00
Georg Brandl
3eef441700
Follow-up to r67746 in order to restore backwards-compatibility for
...
those who (monkey-)patch TextWrapper.wordsep_re with a custom RE.
2008-12-27 18:27:53 +00:00
Antoine Pitrou
74af3bbfbd
Issue #4163 : Use unicode-friendly word splitting in the textwrap functions when given an unicode string.
2008-12-13 23:12:30 +00:00
Georg Brandl
3129ea2e05
#4544 : add dedent to textwrap.__all__.
2008-12-05 11:34:51 +00:00
Brett Cannon
791ec1fc13
Remove assignment to True/False to silence the SyntaxWarning that is triggered
...
by -3.
2008-08-01 01:34:05 +00:00
Georg Brandl
6f95ae55b1
#2659 : add `break_on_hyphens` to TextWrapper.
2008-05-11 10:42:28 +00:00
Mark Dickinson
fe536f53ea
Issue 2635: fix bug in the fix_sentence_endings option to textwrap.fill.
2008-04-25 16:59:09 +00:00
Georg Brandl
c6fde7293e
Fix #1146 : TextWrap vs words 1-character shorter than the width.
...
Patch by Quentin Gallet-Gilles.
2008-01-19 19:48:19 +00:00
Georg Brandl
9e6b47002a
Patch #1581073 : add a flag to textwrap that prevents the dropping of
...
whitespace while wrapping.
2007-03-13 18:15:41 +00:00
Tim Peters
4f96f1f2b5
Whitespace normalization.
2006-06-11 19:42:51 +00:00
Greg Ward
7f54740c4d
Bug #1361643 : fix textwrap.dedent() so it handles tabs appropriately,
...
i.e. do *not* expand tabs, but treat them as whitespace that is not
equivalent to spaces. Add a couple of test cases. Clarify docs.
2006-06-11 00:40:49 +00:00
Raymond Hettinger
8bfa8935ea
textwrap now processes text chucks at O(n) speed instead of O(n**2).
...
Patch #1209527 (Contributed by Connelly).
2005-07-15 06:53:35 +00:00
Greg Ward
40407943b7
SF #1149508 : ensure textwrap handles hyphenated numbers correctly,
...
eg. "2004-03-04" is not broken across lines. (Merged from 2.4 branch.)
2005-03-05 02:53:17 +00:00
Raymond Hettinger
0c26ab02e6
Removed unused line.
2005-01-03 07:14:12 +00:00
Greg Ward
6186410db0
SF #965425 : fix so hyphenated words surrounded by punctuation are
...
wrapped correctly.
2004-06-03 01:59:41 +00:00
Greg Ward
f0ba764dbb
SF #847346 : merge from release23-maint branch: remove misguided
...
optimization for short input; beef up tests for fix_sentence_endings
feature.
2004-05-13 01:53:10 +00:00
Raymond Hettinger
c11dbcd4bf
SF bug 797650: Infinite loop in textwrap.py
...
When the indents were set to longer than the width and long word breaking
was enabled, an infinite loop would result because the inner loop did not
assure that at least one character was stripped off on every pass.
2003-08-30 14:43:55 +00:00
Greg Ward
523008c6cf
Update copyright dates.
...
Define True and False (if necessary) so this module can be copied as-is
to other projects (eg. Optik, Docutils) that don't depend on Python 2.3.
2003-06-15 15:37:18 +00:00
Greg Ward
52ae0a596f
Remove comment about Unicode: SF #622831 was fixed loooong ago!
2003-06-14 00:26:39 +00:00
Tim Peters
c2659cff5d
Whitespace normalization.
2003-05-12 20:19:37 +00:00
Greg Ward
86e1790cad
Clarify the dedent() example a bit by indenting the input lines unevenly.
2003-05-08 02:12:35 +00:00
Greg Ward
2557100b9e
Minor clarification of dedent().
2003-05-08 02:02:50 +00:00