diff --git a/owocr/run.py b/owocr/run.py index 85dc153..566615a 100644 --- a/owocr/run.py +++ b/owocr/run.py @@ -1926,6 +1926,10 @@ class OutputResult: else: current_paragraph.append(re.sub(r'\s+', ' ', line).strip()) + if current_paragraph: + paragraph = line_separator.join(current_paragraph) + paragraphs.append(paragraph) + text = self.paragraph_separator.join(paragraphs) return text