Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | 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. |