BUG: dont cut last char if start is a space

This commit is contained in:
chrys87 2016-08-29 10:16:29 +02:00 committed by GitHub
parent 7b0403c8e0
commit 27a5794d86

View File

@ -29,8 +29,8 @@ def getTextBetweenMarks(firstMark, secondMark, inText):
else: else:
textPart += inText[currY] textPart += inText[currY]
if len(inText[currY].strip()) != 0: if len(inText[currY].strip()) != 0:
if len(textPart) - len(textPart[::-1].strip()) > 0: if len(textPart) - len(textPart.rstrip()) > 0:
textPart = textPart[:len(textPart[::-1].strip())] + "\n" textPart = textPart[:len(textPart.rstrip())] + "\n"
else: else:
textPart += '\n' textPart += '\n'
else: else: