Mercurial > skaapsteker
changeset 182:c9a7ab87e0d4
Text: Actually unwrap in unwrapped
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Wed, 06 Apr 2011 16:38:26 +0200 |
parents | 77228c101cfc |
children | 691d2795ae3c |
files | skaapsteker/widgets/text.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/skaapsteker/widgets/text.py Wed Apr 06 20:22:28 2011 +0200 +++ b/skaapsteker/widgets/text.py Wed Apr 06 16:38:26 2011 +0200 @@ -58,10 +58,10 @@ def _wrap(self): - unwrapped = self.text.split('\n\n') + unwrapped = [para.replace('\n', ' ') + for para in self.text.split('\n\n')] text = [] for paragraph in unwrapped: - paragraph = paragraph.replace('\n', ' ') words = paragraph.split(' ') nwords = len(words) from_ = 0