Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Issue #8767: Restore building with --disable-unicode. | Martin v. Löwis | 2012-05-20 | 1 | -2/+10 |
| | | | | Original patch by Stefano Taschini. | ||||
* | Optimize optimization and fix method name in docstring. | Georg Brandl | 2009-09-18 | 1 | -3/+3 |
| | |||||
* | Follow-up to r67746 in order to restore backwards-compatibility for | Georg Brandl | 2008-12-27 | 1 | -7/+19 |
| | | | | those who (monkey-)patch TextWrapper.wordsep_re with a custom RE. | ||||
* | Issue #4163: Use unicode-friendly word splitting in the textwrap functions ↵ | Antoine Pitrou | 2008-12-13 | 1 | -6/+8 |
| | | | | when given an unicode string. | ||||
* | #4544: add `dedent` to textwrap.__all__. | Georg Brandl | 2008-12-05 | 1 | -1/+1 |
| | |||||
* | Remove assignment to True/False to silence the SyntaxWarning that is triggered | Brett Cannon | 2008-08-01 | 1 | -5/+5 |
| | | | | by -3. | ||||
* | #2659: add ``break_on_hyphens`` to TextWrapper. | Georg Brandl | 2008-05-11 | 1 | -2/+21 |
| | |||||
* | Issue 2635: fix bug in the fix_sentence_endings option to textwrap.fill. | Mark Dickinson | 2008-04-25 | 1 | -0/+1 |
| | |||||
* | Fix #1146: TextWrap vs words 1-character shorter than the width. | Georg Brandl | 2008-01-19 | 1 | -1/+6 |
| | | | | Patch by Quentin Gallet-Gilles. | ||||
* | Patch #1581073: add a flag to textwrap that prevents the dropping of | Georg Brandl | 2007-03-13 | 1 | -4/+8 |
| | | | | whitespace while wrapping. | ||||
* | Whitespace normalization. | Tim Peters | 2006-06-11 | 1 | -4/+4 |
| | |||||
* | Bug #1361643: fix textwrap.dedent() so it handles tabs appropriately, | Greg Ward | 2006-06-11 | 1 | -29/+46 |
| | | | | | 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. | ||||
* | textwrap now processes text chucks at O(n) speed instead of O(n**2). | Raymond Hettinger | 2005-07-15 | 1 | -9/+13 |
| | | | | Patch #1209527 (Contributed by Connelly). | ||||
* | SF #1149508: ensure textwrap handles hyphenated numbers correctly, | Greg Ward | 2005-03-05 | 1 | -3/+4 |
| | | | | eg. "2004-03-04" is not broken across lines. (Merged from 2.4 branch.) | ||||
* | Removed unused line. | Raymond Hettinger | 2005-01-03 | 1 | -1/+0 |
| | |||||
* | SF #965425: fix so hyphenated words surrounded by punctuation are | Greg Ward | 2004-06-03 | 1 | -3/+3 |
| | | | | wrapped correctly. | ||||
* | SF #847346: merge from release23-maint branch: remove misguided | Greg Ward | 2004-05-13 | 1 | -10/+8 |
| | | | | | optimization for short input; beef up tests for fix_sentence_endings feature. | ||||
* | SF bug 797650: Infinite loop in textwrap.py | Raymond Hettinger | 2003-08-30 | 1 | -1/+1 |
| | | | | | | 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. | ||||
* | Update copyright dates. | Greg Ward | 2003-06-15 | 1 | -1/+9 |
| | | | | | 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. | ||||
* | Remove comment about Unicode: SF #622831 was fixed loooong ago! | Greg Ward | 2003-06-14 | 1 | -3/+0 |
| | |||||
* | Whitespace normalization. | Tim Peters | 2003-05-12 | 1 | -1/+1 |
| | |||||
* | Clarify the dedent() example a bit by indenting the input lines unevenly. | Greg Ward | 2003-05-08 | 1 | -4/+4 |
| | |||||
* | Minor clarification of dedent(). | Greg Ward | 2003-05-08 | 1 | -3/+3 |
| | |||||
* | SF patch #598163 (Ville Vainio, vvainio@users.sourceforge.net): | Greg Ward | 2003-05-08 | 1 | -0/+42 |
| | | | | | | | | | add dedent() function, to remove indentation from multiline strings (eg. triple-quoted strings). Differs from inspect.getdoc() by not special-casing the first line (often a sensible approach for non-docstring multiline strings). This should make this function more general (symmetric 'indent' also possible), and more fitting for the textwrap module. | ||||
* | SF #596434: tweak wordsep_re so the definition of an em-dash is | Greg Ward | 2003-05-07 | 1 | -1/+1 |
| | | | | | stricter: specifically, "--" must be preceded by a limited set of characters, not by any non-whitespace character. | ||||
* | SF #726446: raise ValueError if width <= 0. | Greg Ward | 2003-05-07 | 1 | -0/+2 |
| | |||||
* | Fix docstring typo | Andrew M. Kuchling | 2003-02-14 | 1 | -1/+1 |
| | |||||
* | Add __all__ (suggested by Raymond Hettinger). | Greg Ward | 2003-02-03 | 1 | -3/+5 |
| | | | | | Rename 'whitespace' global to '_whitespace' -- it's not part of the public interface. | ||||
* | Hardcode the recognized whitespace characters to the US-ASCII whitespace | Greg Ward | 2002-12-12 | 1 | -3/+12 |
| | | | | chars. See the comment for rationale. | ||||
* | Tweak generation of unicode_whitespace_trans -- clearer, more | Greg Ward | 2002-12-11 | 1 | -2/+3 |
| | | | | efficient. Suggested by MAL. | ||||
* | Fix SF bug #622849: in _wrap_chunks(), ensure that leading whitespace in | Greg Ward | 2002-12-09 | 1 | -2/+3 |
| | | | | the input string is always preserved. | ||||
* | Fix SF bug #622831 (I think): add unicode_whitespace_trans class | Greg Ward | 2002-12-09 | 1 | -1/+8 |
| | | | | | | attribute, and modify _munge_whitespace() to recognize Unicode strings and use unicode_whitespace_trans to munge them. Still need to add a test to make sure I've really fixed the bug. | ||||
* | Add comment about inability to handle Unicode strings (hopefully a | Greg Ward | 2002-10-22 | 1 | -0/+3 |
| | | | | temporary condition). | ||||
* | Fix copyright date: the core of this code actually dates back to 1999 | Greg Ward | 2002-10-13 | 1 | -2/+2 |
| | | | | (rev. 1.4 of distutils/fancy_getopt.py). | ||||
* | Fix an endcase bug: initial_indent was ignored when the text was short | Guido van Rossum | 2002-10-02 | 1 | -2/+3 |
| | | | | enough to fit in one line. | ||||
* | Tweak wordsep_re again: this time to recognize an em-dash with | Greg Ward | 2002-08-22 | 1 | -1/+1 |
| | | | | any non-whitespace characters adjacent, not just \w. | ||||
* | Fix SF bug #596434: tweak wordsep_re so "--foo-bar" now splits | Greg Ward | 2002-08-22 | 1 | -1/+1 |
| | | | | | into /--foo-/bar/ rather than /--/foo-/bar/. Needed for Optik and Docutils to handle Unix-style command-line options properly. | ||||
* | Whitespace normalization. | Tim Peters | 2002-07-16 | 1 | -3/+3 |
| | |||||
* | Docstring improvements. In particular, added docstrings for the | Greg Ward | 2002-07-04 | 1 | -10/+27 |
| | | | | | standalone wrap() and fill() functions. This should address the misunderstanding that led to SF bug 577106. | ||||
* | Took initial_tab and subsequent_tab away from the fill() method and | Greg Ward | 2002-06-10 | 1 | -22/+34 |
| | | | | | | | | transformed them into the initial_indent and subsequent_indent instance attributes. Now they actually work as advertised, ie. they are accounted for in the width of each output line. Plus you can use them with wrap() as well as fill(), and fill() went from simple-and-broken to trivial-and-working. | ||||
* | Allow the standalone wrap() and fill() functions to take arbitrary | Greg Ward | 2002-06-10 | 1 | -4/+6 |
| | | | | keyword args, which are passed directly to the TextWrapper constructor. | ||||
* | Make 'width' an instance attribute rather than an argument to the wrap() | Greg Ward | 2002-06-10 | 1 | -31/+32 |
| | | | | | | | and fill() methods. Keep interface of existing wrap() and fill() functions by going back to having them construct a new TextWrapper instance on each call, with the preferred width passed to the constructor. | ||||
* | Make all of TextWrapper's options keyword args to the constructor. | Greg Ward | 2002-06-09 | 1 | -5/+9 |
| | |||||
* | Record copyright and author. | Greg Ward | 2002-06-07 | 1 | -0/+4 |
| | |||||
* | Use True/False instead of 1/0. | Greg Ward | 2002-06-07 | 1 | -5/+5 |
| | |||||
* | Remove islower() -- not used anymore. | Greg Ward | 2002-06-07 | 1 | -6/+0 |
| | |||||
* | Conform to the bloody coding standards: "def foo()" not "def foo ()". | Greg Ward | 2002-06-07 | 1 | -10/+10 |
| | | | | Yuck. | ||||
* | Convert _fix_sentence_endings() to use a regex, and augment it to | Greg Ward | 2002-06-07 | 1 | -8/+8 |
| | | | | | handle sentences like this: And she said, "Go to hell!" Can you believe that? | ||||
* | Add fix_sentence_endings option to control whether we ensure that | Greg Ward | 2002-06-07 | 1 | -16/+25 |
| | | | | | | | | sentences are separated by two spaces. Improve _fix_sentence_endings() a bit -- look for ".!?" instead of just ".", and factor out the list of sentence-ending punctuation characters to a class attribute. | ||||
* | Initial revision. Currently biased towards English in a fixed-width font, | Greg Ward | 2002-06-07 | 1 | -0/+239 |
according to the conventions that I (and Tim Peters) learned in school. |