parent
431e0f2b48
commit
8c3e92aa31
1 changed files with 2 additions and 2 deletions
|
|
@ -262,7 +262,7 @@ class CleanText(Filter):
|
||||||
txt = [txt.text.strip()]
|
txt = [txt.text.strip()]
|
||||||
txt = u' '.join(txt) # 'foo bar'
|
txt = u' '.join(txt) # 'foo bar'
|
||||||
if newlines:
|
if newlines:
|
||||||
txt = re.sub(u'\s+', u' ', txt, flags=re.UNICODE) # 'foo bar'
|
txt = re.compile(u'\s+', flags=re.UNICODE).sub(u' ', txt) # 'foo bar'
|
||||||
else:
|
else:
|
||||||
# normalize newlines and clean what is inside
|
# normalize newlines and clean what is inside
|
||||||
txt = '\n'.join([cls.clean(l) for l in txt.splitlines()])
|
txt = '\n'.join([cls.clean(l) for l in txt.splitlines()])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue