Compact spaces after \n conversion in soup2html.
- Legacy-Id: 351
This commit is contained in:
parent
44b76b7b4f
commit
e2db0d869d
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue