Don't trunkate web links

main2
Bob Mottram 2019-10-25 19:27:32 +01:00
parent 93008d97b1
commit 65227e7c59
1 changed files with 4 additions and 0 deletions

View File

@ -237,6 +237,10 @@ def removeLongWords(content: str,maxWordLength: int,longWordsList: []) -> str:
for wordStr in longWordsList: for wordStr in longWordsList:
if wordStr.startswith('<'): if wordStr.startswith('<'):
continue continue
if wordStr.startswith('http'):
continue
if '/' in wordStr:
continue
if len(wordStr[maxWordLength:])<maxWordLength: if len(wordStr[maxWordLength:])<maxWordLength:
content= \ content= \
content.replace(wordStr, \ content.replace(wordStr, \