From 95932cc89d13ab6480162b18dc7252cc61954a5a Mon Sep 17 00:00:00 2001 From: AuroraWright Date: Sat, 3 Feb 2024 11:44:56 +0100 Subject: [PATCH] Fix screen capture regex --- owocr/run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/owocr/run.py b/owocr/run.py index ef3ca54..a02ba67 100644 --- a/owocr/run.py +++ b/owocr/run.py @@ -262,7 +262,7 @@ def process_and_write_results(engine_instance, img_or_path, write_to, last_text) if res: orig_text = text if last_text != '': - text = ''.join(map(str, [block for block in re.split(r'[  ,!?.、。?!"「」\']', text) if block not in re.split(r'[  ,!?.、。?!"「」\']', last_text)])) + text = ''.join(map(str, [block for block in re.split(r'[  ,!?.、。?!"「」\n\']', text) if block not in re.split(r'[  ,!?.、。?!"「」\n\']', last_text)])) text = post_process(text) logger.opt(ansi=True).info(f'Text recognized in {t1 - t0:0.03f}s using <{engine_color}>{engine_instance.readable_name}: {text}') if config.get_general('notifications'):