From 1919a2990c35899edf12aacbdaaf50c725e331b4 Mon Sep 17 00:00:00 2001 From: shah Date: Sat, 11 Oct 2014 20:42:52 +0200 Subject: [PATCH] join sentences with a withspace --- goose/cleaners.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/goose/cleaners.py b/goose/cleaners.py index 2e8bc87a..d29a8c3c 100644 --- a/goose/cleaners.py +++ b/goose/cleaners.py @@ -179,7 +179,7 @@ def get_replacement_nodes(self, doc, div): # node is a p # and already have some replacement text if self.parser.getTag(kid) == 'p' and len(replacement_text) > 0: - newNode = self.get_flushed_buffer(''.join(replacement_text), doc) + newNode = self.get_flushed_buffer(' '.join(replacement_text), doc) nodes_to_return.append(newNode) replacement_text = [] nodes_to_return.append(kid) @@ -221,7 +221,7 @@ def get_replacement_nodes(self, doc, div): # flush out anything still remaining if(len(replacement_text) > 0): - new_node = self.get_flushed_buffer(''.join(replacement_text), doc) + new_node = self.get_flushed_buffer(' '.join(replacement_text), doc) nodes_to_return.append(new_node) replacement_text = []