From 37fee435ecf78f7d3d81003a9dcff87b05d0bdb2 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 17 Oct 2020 13:08:20 +0100 Subject: [PATCH] Add a space to separate hashtags --- newsdaemon.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/newsdaemon.py b/newsdaemon.py index ade72823b..7aaa7befc 100644 --- a/newsdaemon.py +++ b/newsdaemon.py @@ -223,7 +223,7 @@ def newswireHashtagProcessing(session, baseDir: str, postJsonObject: {}, 'type': 'Hashtag' } hashtagHtml = \ - "#" + \ htId + "" @@ -253,8 +253,9 @@ def newswireHashtagProcessing(session, baseDir: str, postJsonObject: {}, htId + "" content = postJsonObject['object']['content'] if hashtagHtml in content: - postJsonObject['object']['content'] = \ - content.replace(hashtagHtml, '') + content = \ + content.replace(hashtagHtml, '').replace(' ', ' ') + postJsonObject['object']['content'] = content del postJsonObject['object']['tag'][htId] actionOccurred = True