Compact spaces after \n conversion in soup2html.

- Legacy-Id: 351
This commit is contained in:
Henrik Levkowetz 2007-06-12 22:46:30 +00:00
parent 44b76b7b4f
commit e2db0d869d

View file

@ -44,11 +44,9 @@ def para(words, pre):
text = "".join(words) text = "".join(words)
text = unescape(text) text = unescape(text)
if not pre: if not pre:
#print "*** Text to be wrapped:"
#print "["+text+"]"
text = re.sub("[\t ]+", " ", text)
text = text.strip("\n") text = text.strip("\n")
text = text.lstrip() text = text.lstrip()
text = re.sub("[\t\n ]+", " ", text)
text = textwrap.fill(text) text = textwrap.fill(text)
return text return text