diff --git a/content.py b/content.py
index b55fdb53..49f8dfb3 100644
--- a/content.py
+++ b/content.py
@@ -100,10 +100,6 @@ def addHashTags(wordStr: str,httpPrefix: str,domain: str,replaceHashTags: {},pos
"""Detects hashtags and adds them to the replacements dict
Also updates the hashtags list to be added to the post
"""
- if not wordStr.startswith('#'):
- return False
- if len(wordStr)<2:
- return False
if replaceHashTags.get(wordStr):
return True
hashtag=wordStr[1:]
@@ -182,10 +178,6 @@ def addEmoji(baseDir: str,wordStr: str,httpPrefix: str,domain: str,replaceEmoji:
def addMention(wordStr: str,httpPrefix: str,following: str,replaceMentions: {},recipients: [],tags: {}) -> bool:
"""Detects mentions and adds them to the replacements dict and recipients list
"""
- if not wordStr.startswith('@'):
- return False
- if len(wordStr)<2:
- return False
possibleHandle=wordStr[1:]
# @nick
if following and '@' not in possibleHandle:
@@ -238,22 +230,22 @@ def addMention(wordStr: str,httpPrefix: str,following: str,replaceMentions: {},r
return True
return False
-def removeLongWords(content: str,maxWordLength: int) -> str:
+def removeLongWords(content: str,maxWordLength: int,longWordsList: []) -> str:
"""Breaks up long words so that on mobile screens this doesn't disrupt the layout
"""
words=content.split(' ')
- for wordStr in words:
- if not wordStr.startswith('<'):
- if len(wordStr)>maxWordLength:
- if len(wordStr[maxWordLength:])
') return '
'+content+'
'