diff --git a/content.py b/content.py index 9e83b354..ea41a40f 100644 --- a/content.py +++ b/content.py @@ -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: diff --git a/tests.py b/tests.py index be85000b..ed36705b 100644 --- a/tests.py +++ b/tests.py @@ -1747,6 +1747,11 @@ def testWebLinks(): '

Test1 test2 ' '#YetAnotherExcessivelyLongwindedAndBorin\ngHashtag

') + exampleText = \ + "

Don't remove a p2p link rad:git:hwd1yrerc3mcgn8ga9rho3dqi4w33nep7kxmqezss4topyfgmexihp33xcw

" + resultText = removeLongWords(addWebLinks(exampleText), 40, []) + assert resultText == exampleText + def testAddEmoji(): print('testAddEmoji')