Remove leading space from links

main
Bob Mottram 2021-03-22 14:36:27 +00:00
parent 84789ac2f2
commit 96cbed7dd1
2 changed files with 3 additions and 1 deletions

View File

@ -2718,6 +2718,8 @@ def testFirstParagraphFromString():
'<p><a href="https://somesite.com/somepath">This is a test</a></p>' + \ '<p><a href="https://somesite.com/somepath">This is a test</a></p>' + \
'<p>This is another paragraph</p>' '<p>This is another paragraph</p>'
resultStr = firstParagraphFromString(testStr) resultStr = firstParagraphFromString(testStr)
if resultStr != 'This is a test':
print(resultStr)
assert resultStr == 'This is a test' assert resultStr == 'This is a test'
testStr = 'Testing without html' testStr = 'Testing without html'

View File

@ -263,7 +263,7 @@ def removeHtml(content: str) -> str:
removing = False removing = False
elif not removing: elif not removing:
result += ch result += ch
result = result.replace(' ', ' ') result = result.replace(' ', ' ').strip()
return result return result