forked from indymedia/epicyon
Don't remove radicle links
parent
bcbcfed886
commit
9e483bdacf
|
@ -651,6 +651,8 @@ def removeLongWords(content: str, maxWordLength: int,
|
||||||
continue
|
continue
|
||||||
elif 'dat:' in wordStr:
|
elif 'dat:' in wordStr:
|
||||||
continue
|
continue
|
||||||
|
elif 'rad:' in wordStr:
|
||||||
|
continue
|
||||||
elif 'hyper:' in wordStr:
|
elif 'hyper:' in wordStr:
|
||||||
continue
|
continue
|
||||||
elif 'briar:' in wordStr:
|
elif 'briar:' in wordStr:
|
||||||
|
|
5
tests.py
5
tests.py
|
@ -1747,6 +1747,11 @@ def testWebLinks():
|
||||||
'<p>Test1 test2 '
|
'<p>Test1 test2 '
|
||||||
'#YetAnotherExcessivelyLongwindedAndBorin\ngHashtag</p>')
|
'#YetAnotherExcessivelyLongwindedAndBorin\ngHashtag</p>')
|
||||||
|
|
||||||
|
exampleText = \
|
||||||
|
"<p>Don't remove a p2p link rad:git:hwd1yrerc3mcgn8ga9rho3dqi4w33nep7kxmqezss4topyfgmexihp33xcw</p>"
|
||||||
|
resultText = removeLongWords(addWebLinks(exampleText), 40, [])
|
||||||
|
assert resultText == exampleText
|
||||||
|
|
||||||
|
|
||||||
def testAddEmoji():
|
def testAddEmoji():
|
||||||
print('testAddEmoji')
|
print('testAddEmoji')
|
||||||
|
|
Loading…
Reference in New Issue