Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

join sentences with a whitespace #152

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions goose/cleaners.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 = []

Expand Down