diff --git a/Makefile b/Makefile index d9cffa3..a56bf40 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ package: rm -rf build python setup.py sdist bdist_wheel -VERSION = 0.2.2 +VERSION = 0.2.2.1 upload: python -m twine upload dist/pix2text-$(VERSION)* --verbose diff --git a/RELEASE.md b/RELEASE.md index 042c228..a3defcd 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,5 +1,11 @@ # Release Notes +## Update 2023.02.19:发布 **V0.2.2.1** + +主要变更: +* 修复bug。 + + ## Update 2023.02.19:发布 **V0.2.2** 主要变更: diff --git a/pix2text/__version__.py b/pix2text/__version__.py index b6a7459..b5b5aeb 100644 --- a/pix2text/__version__.py +++ b/pix2text/__version__.py @@ -1,4 +1,4 @@ # coding: utf-8 # Copyright (C) 2022, [Breezedeus](https://github.com/breezedeus). -__version__ = '0.2.2' +__version__ = '0.2.2.1' diff --git a/pix2text/latex_ocr.py b/pix2text/latex_ocr.py index 2336dca..f25599c 100644 --- a/pix2text/latex_ocr.py +++ b/pix2text/latex_ocr.py @@ -92,7 +92,7 @@ def find_all_left_or_right(latex, left_or_right='left'): # 如 "\left \big(" while latex[end - 1] in ('\\', ' '): end += 1 - while latex[end].isalpha(): + while end < len(latex) and latex[end].isalpha(): end += 1 ori_str = latex[start + prefix_len : end].strip() # FIXME: ori_str中可能出现多个 '\left',此时需要分隔开