Fix bug that leaves out first char found after width differential greater than x_tolerance

This commit is contained in:
Jacob Fenton
2016-03-10 10:01:54 -08:00
parent e06133e49a
commit 7cf92f933a
+1 -2
View File
@@ -118,8 +118,7 @@ def extract_words(chars, x_tolerance=0, y_tolerance=0):
if char["x0"] > (last_char["x1"] + tolerance):
words.append(current_word)
current_word = []
else:
current_word.append(char)
current_word.append(char)
if len(current_word) > 0:
words.append(current_word)