generate_test_data: Fix remove_line_breaks algorithm.

This commit is contained in:
Rishi Gupta 2017-08-04 15:28:08 -07:00 committed by Tim Abbott
parent dd49bec93c
commit 4350b52740
1 changed files with 3 additions and 1 deletions

View File

@ -198,10 +198,12 @@ def remove_line_breaks(fh):
if text != "": if text != "":
para.append(text) para.append(text)
else: else:
if para is not None: if para:
results.append(" ".join(para)) results.append(" ".join(para))
# reset the paragraph # reset the paragraph
para = [] para = []
if para:
results.append(" ".join(para))
return results return results