diff --git a/content.py b/content.py index 1d8334412..13062660d 100644 --- a/content.py +++ b/content.py @@ -788,6 +788,12 @@ def addHtmlTags(baseDir: str, httpPrefix: str, prevWordStr = '' continue elif firstChar == '#': + # remove any endings from the hashtag + hashTagEndings = ('.', ':', ';', '-', '\n') + for ending in hashTagEndings: + if wordStr.endswith(ending): + wordStr = wordStr.replace(ending, '') + if _addHashTags(wordStr, httpPrefix, originalDomain, replaceHashTags, hashtags): prevWordStr = ''