Skip to content

Commit

Permalink
Removing excess carriage returns
Browse files Browse the repository at this point in the history
  • Loading branch information
muggot committed Feb 17, 2013
1 parent 7420632 commit 430116f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions goose/outputformatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,12 @@ def convertToText(self):
if txt:
txt = HTMLParser().unescape(txt)
txts.append(innerTrim(txt))
text = '\n\n'.join(txts)
text = re.sub(u'[\ufffc]','\n\n',text)
text = '\n'.join(txts)
text = re.sub(u'[\ufffc]','\n',text)
lines = text.split('\n')
text = ''
for line in lines:
if re.search('[^ \t\r]',line): text += line + '\n'
return text

def convertLinksToText(self):
Expand Down

0 comments on commit 430116f

Please sign in to comment.