Lines Matching refs:chunks
176 chunks = self.wordsep_re.split(text)
178 chunks = self.wordsep_simple_re.split(text)
179 chunks = [c for c in chunks if c]
180 return chunks
182 def _fix_sentence_endings(self, chunks): argument
193 while i < len(chunks)-1:
194 if chunks[i+1] == " " and patsearch(chunks[i]):
195 chunks[i+1] = " "
241 def _wrap_chunks(self, chunks): argument
267 chunks.reverse()
269 while chunks:
287 if self.drop_whitespace and chunks[-1].strip() == '' and lines:
288 del chunks[-1]
290 while chunks:
291 l = len(chunks[-1])
295 cur_line.append(chunks.pop())
304 if chunks and len(chunks[-1]) > width:
305 self._handle_long_word(chunks, cur_line, cur_len, width)
316 (not chunks or
318 len(chunks) == 1 and
319 not chunks[0].strip()) and cur_len <= width):
359 chunks = self._split_chunks(text)
361 self._fix_sentence_endings(chunks)
362 return self._wrap_chunks(chunks)