forked from indymedia/epicyon
Don't remove radicle links
This commit is contained in:
1 parent
bcbcfed886
commit
9e483bdacf
2 files changed
+7
No files matched your search
@@ -651,6 +651,8 @@ def removeLongWords(content: str, maxWordLength: int,
|
||||
continue
|
||||
elif 'dat:' in wordStr:
|
||||
continue
|
||||
elif 'rad:' in wordStr:
|
||||
continue
|
||||
elif 'hyper:' in wordStr:
|
||||
continue
|
||||
elif 'briar:' in wordStr:
|
||||
|
||||
@@ -1747,6 +1747,11 @@ def testWebLinks():
|
||||
'<p>Test1 test2 '
|
||||
'#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():
|
||||
print('testAddEmoji')
|
||||
|
||||
Reference in new issue
Block a user