From 96cbed7dd170b62677125f15a9ba033cc4124df9 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 22 Mar 2021 14:36:27 +0000 Subject: [PATCH] Remove leading space from links --- tests.py | 2 ++ utils.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests.py b/tests.py index 7b187bf6b..f66d6bb6f 100644 --- a/tests.py +++ b/tests.py @@ -2718,6 +2718,8 @@ def testFirstParagraphFromString(): '

This is a test

' + \ '

This is another paragraph

' resultStr = firstParagraphFromString(testStr) + if resultStr != 'This is a test': + print(resultStr) assert resultStr == 'This is a test' testStr = 'Testing without html' diff --git a/utils.py b/utils.py index ae3b91ccf..ee51074fb 100644 --- a/utils.py +++ b/utils.py @@ -263,7 +263,7 @@ def removeHtml(content: str) -> str: removing = False elif not removing: result += ch - result = result.replace(' ', ' ') + result = result.replace(' ', ' ').strip() return result