From 38b82391b08cd310a6c0484d6cecac765c4bd5c2 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 25 Oct 2020 14:37:51 +0000 Subject: [PATCH] Simplify --- newsdaemon.py | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/newsdaemon.py b/newsdaemon.py index 0ee41c214..9550212bc 100644 --- a/newsdaemon.py +++ b/newsdaemon.py @@ -626,18 +626,15 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str, "\" class=\"addedHashtag\" " + \ "rel=\"tag\">#" + \ htId + "" - if tagName in blog['object']['content']: - blog['object']['content'].replace(tagName, hashtagHtml) - else: - content = blog['object']['content'] - if hashtagHtml not in content: - if content.endswith('

'): - content = \ - content[:len(content) - len('

')] + \ - hashtagHtml + '

' - else: - content += hashtagHtml - blog['object']['content'] = content + content = blog['object']['content'] + if hashtagHtml not in content: + if content.endswith('

'): + content = \ + content[:len(content) - len('

')] + \ + hashtagHtml + '

' + else: + content += hashtagHtml + blog['object']['content'] = content # update the newswire tags if new ones have been found by # newswireHashtagProcessing