From c5624ace1e953adaa6cf045d30375452d7e8dca1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=B0=8F=E8=92=99?= Date: Thu, 21 Mar 2024 11:06:07 +0800 Subject: [PATCH] =?UTF-8?q?line=5Fto=5Fstandard=5Fformat=20=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- magic_pdf/dict2md/ocr_mkcontent.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/magic_pdf/dict2md/ocr_mkcontent.py b/magic_pdf/dict2md/ocr_mkcontent.py index 12e39e7f..76ffbd30 100644 --- a/magic_pdf/dict2md/ocr_mkcontent.py +++ b/magic_pdf/dict2md/ocr_mkcontent.py @@ -125,7 +125,8 @@ def line_to_standard_format(line): line_text += f"${inline_equation}$" inline_equation_num += 1 elif span['type'] == ContentType.Text: - line_text += span['content'] + text_content = ocr_escape_special_markdown_char(span['content']) # 转义特殊符号 + line_text += text_content content = { 'type': 'text', 'text': line_text,