Skip to content

Commit c889d6e

Browse files
authored
Fix TSV parsing - white space at start/end of file
Fixes madmaze#290 - partial regression from 6d5a352
1 parent c17299c commit c889d6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pytesseract.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def run_and_get_output(
280280

281281
def file_to_dict(tsv, cell_delimiter, str_col_idx):
282282
result = {}
283-
rows = [row.split(cell_delimiter) for row in tsv.split('\n')]
283+
rows = [row.split(cell_delimiter) for row in tsv.strip().split('\n')]
284284
if not rows:
285285
return result
286286

0 commit comments

Comments
 (0)