Lines Matching defs:whitespace

12 # Hardcode the recognized whitespace characters to the US-ASCII
13 # whitespace characters. The main reason for doing this is that
43 Replace all whitespace characters in the input text by spaces
59 Drop leading and trailing whitespace from lines.
76 whitespace = r'[%s]' % re.escape(_whitespace)
77 nowhitespace = '[^' + whitespace[1:]
79 ( # any whitespace
94 'ws': whitespace, 'nws': nowhitespace},
102 wordsep_simple_re = re.compile(r'(%s+)' % whitespace)
103 del whitespace
146 Munge whitespace in text: expand tabs and convert all other
147 whitespace characters to spaces. Eg. " foo\\tbar\\n\\nbaz"
202 Handle a chunk of text (most likely a word, not whitespace) that
244 to words and the whitespace between them: each chunk is
247 whitespace; ie. a chunk is either all whitespace or a "word".
249 lines, but apart from that whitespace is preserved.
282 # First chunk on line is whitespace -- drop it, unless this
305 # If the last chunk on this line is all whitespace, drop it.
353 and all other whitespace characters (including newline) are
379 all other whitespace characters (including newline) are converted to
392 whitespace characters converted to space. See TextWrapper class for
401 The text first has its whitespace collapsed. If it then fits in
420 """Remove any common leading whitespace from every line in `text`.
426 Note that tabs and spaces are both treated as whitespace, but they
428 considered to have no common leading whitespace.
451 # Find the largest common whitespace between current line and previous
476 consist solely of whitespace characters.