Fix the silly "no change" message

This commit is contained in:
Eryn Wells 2016-07-06 15:10:29 -04:00
parent a35de85eda
commit 08b01c00f3

View file

@ -73,11 +73,12 @@ def calculate_score_and_find_operators(text):
if not found:
break
if text.endswith(':'):
text = text[:-1]
did_change = original_text != text
if did_change:
# Strip the trailing :
if text.endswith(':'):
text = text[:-1]
return score, text
else:
return None, None