Skip to content

Commit

Permalink
Merge pull request #1045 from myhloli/dev
Browse files Browse the repository at this point in the history
fix(tools): handle empty language string in common.py
  • Loading branch information
myhloli authored Nov 21, 2024
2 parents 3b9b95c + 20ed0cd commit 9c8d995
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions magic_pdf/tools/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ def do_parse(
f_draw_model_bbox = True
f_draw_line_sort_bbox = True

if lang == "":
lang = None

pdf_bytes = convert_pdf_bytes_to_bytes_by_pymupdf(pdf_bytes, start_page_id, end_page_id)

orig_model_list = copy.deepcopy(model_list)
Expand Down

0 comments on commit 9c8d995

Please sign in to comment.