From 885ab5410a8f0bf834d203e7833a74e842fd92d9 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Fri, 20 Sep 2024 19:36:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E3=80=90=E7=9F=A5?= =?UTF-8?q?=E8=AF=86=E5=BA=93=E3=80=91=E8=AF=AD=E9=9B=80=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E7=9A=84word=EF=BC=8C=E5=AF=BC=E5=85=A5=E7=9F=A5=E8=AF=86?= =?UTF-8?q?=E5=BA=93=E6=98=AF=E7=A9=BA=E7=99=BD=E7=9A=84=20#1148?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/handle/impl/doc_split_handle.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/common/handle/impl/doc_split_handle.py b/apps/common/handle/impl/doc_split_handle.py index 8cd08d7ee..dd50d8887 100644 --- a/apps/common/handle/impl/doc_split_handle.py +++ b/apps/common/handle/impl/doc_split_handle.py @@ -110,11 +110,12 @@ class DocSplitHandle(BaseSplitHandle): def to_md(self, doc, images_list, get_image_id): elements = [] for element in doc.element.body: - if element.tag.endswith('tbl'): + tag = str(element.tag) + if tag.endswith('tbl'): # 处理表格 table = Table(element, doc) elements.append(table) - elif element.tag.endswith('p'): + elif tag.endswith('p'): # 处理段落 paragraph = Paragraph(element, doc) elements.append(paragraph)