limit smart hint length

This commit is contained in:
Felix Van der Jeugt 2016-01-17 20:44:14 +01:00
parent 9a889c6866
commit beba5a3d6c

View File

@ -1046,7 +1046,8 @@ class WordHinter:
match = re.search('[A-Za-z]{3,}', candidate)
if not match:
continue
if match.end() - match.start() < 4:
length = match.end() - match.start()
if 4 > length or length > 8:
continue
yield candidate[match.start():match.end()].lower()