Lines Matching refs:chunks
188 chunks = pat.split(text)
189 chunks = filter(None, chunks) # remove empty chunks
190 return chunks
192 def _fix_sentence_endings(self, chunks): argument
203 while i < len(chunks)-1:
204 if chunks[i+1] == " " and patsearch(chunks[i]):
205 chunks[i+1] = " "
243 def _wrap_chunks(self, chunks): argument
262 chunks.reverse()
264 while chunks:
282 if self.drop_whitespace and chunks[-1].strip() == '' and lines:
283 del chunks[-1]
285 while chunks:
286 l = len(chunks[-1])
290 cur_line.append(chunks.pop())
299 if chunks and len(chunks[-1]) > width:
300 self._handle_long_word(chunks, cur_line, cur_len, width)
326 chunks = self._split(text)
328 self._fix_sentence_endings(chunks)
329 return self._wrap_chunks(chunks)