Backing out the previous change so I can commit it with proper comments...(3)
- Legacy-Id: 389
This commit is contained in:
parent
d17dc96f3c
commit
84b9a959a8
|
@ -22,12 +22,11 @@ def run_tests(module_list, verbosity=1, extra_tests=[]):
|
||||||
return django.test.simple.run_tests(module_list, verbosity, extra_tests)
|
return django.test.simple.run_tests(module_list, verbosity, extra_tests)
|
||||||
|
|
||||||
def reduce(html):
|
def reduce(html):
|
||||||
html = re.sub(" :", ": ", html)
|
html = re.sub(" :", ":", html)
|
||||||
if html.count("<li>") > 5*html.count("</li>"):
|
if html.count("<li>") > 5*html.count("</li>"):
|
||||||
html = html.replace("<li>", "</li><li>")
|
html = html.replace("<li>", "</li><li>")
|
||||||
text = html2text(html)
|
text = html2text(html)
|
||||||
text = re.sub('\."', '".', text)
|
text = re.sub('\."', '".', text)
|
||||||
text = re.sub(',"', '",', text)
|
|
||||||
text = [ line.strip() for line in text.split("\n") ]
|
text = [ line.strip() for line in text.split("\n") ]
|
||||||
return text
|
return text
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue