forked from indymedia/epicyon
Create word array
parent
273956c3e8
commit
f59eb08b14
|
@ -150,15 +150,20 @@ def addHtmlTags(baseDir: str,httpPrefix: str, \
|
||||||
if content.startswith('<p>'):
|
if content.startswith('<p>'):
|
||||||
return content
|
return content
|
||||||
words=content.replace(',',' ').replace(';',' ')
|
words=content.replace(',',' ').replace(';',' ')
|
||||||
|
|
||||||
# remove . for words which are not mentions
|
# remove . for words which are not mentions
|
||||||
wordCtr=0
|
wordCtr=0
|
||||||
|
newWords=[]
|
||||||
for wordIndex in range(0,len(words)-1):
|
for wordIndex in range(0,len(words)-1):
|
||||||
wordStr=words[wordIndex]
|
wordStr=words[wordIndex]
|
||||||
if wordStr.endswith('.'):
|
if wordStr.endswith('.'):
|
||||||
if not wordStr.startswith('@'):
|
if not wordStr.startswith('@'):
|
||||||
words[wordIndex]=wordStr[:-1]
|
wordStr=wordStr[:-1]
|
||||||
if wordStr.startswith('.'):
|
if wordStr.startswith('.'):
|
||||||
words[wordIndex]=wordStr[1:]
|
wordStr=wordStr[1:]
|
||||||
|
newWords.append(wordStr)
|
||||||
|
words=newWords
|
||||||
|
|
||||||
replaceMentions={}
|
replaceMentions={}
|
||||||
replaceHashTags={}
|
replaceHashTags={}
|
||||||
replaceEmoji={}
|
replaceEmoji={}
|
||||||
|
|
Loading…
Reference in New Issue