Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9a08f7f

Browse files
committed
minor update
1 parent d2ec132 commit 9a08f7f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/core/common.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,9 @@ def preparePageForLineComparison(page):
11281128
def getFilteredPageContent(page):
11291129
retVal = page
11301130
if isinstance(page, basestring):
1131-
retVal = re.sub(r"(?s)<script.+?</script>|<style.+?</style>|<[^>]+>|\t|\n|\r", "", page)
1131+
retVal = re.sub(r"(?s)<script.+?</script>|<style.+?</style>|<[^>]+>|\t|\n|\r", " ", page)
1132+
while retVal.find(" ") != -1:
1133+
retVal = retVal.replace(" ", " ")
11321134
return retVal
11331135

11341136
def getPageTextWordsSet(page):

0 commit comments

Comments
 (0)