瀏覽代碼

fix: correct typo in function name paser_docx_part -> parser_docx_part (#22936)

tags/1.7.1
little_huang 3 月之前
父節點
當前提交
32df3b68c7
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. 2
    2
      api/core/workflow/nodes/document_extractor/node.py

+ 2
- 2
api/core/workflow/nodes/document_extractor/node.py 查看文件

@@ -305,7 +305,7 @@ def _extract_text_from_doc(file_content: bytes) -> str:
raise TextExtractionError(f"Failed to extract text from DOC: {str(e)}") from e


def paser_docx_part(block, doc: Document, content_items, i):
def parser_docx_part(block, doc: Document, content_items, i):
if isinstance(block, CT_P):
content_items.append((i, "paragraph", Paragraph(block, doc)))
elif isinstance(block, CT_Tbl):
@@ -329,7 +329,7 @@ def _extract_text_from_docx(file_content: bytes) -> str:
part = next(it, None)
i = 0
while part is not None:
paser_docx_part(part, doc, content_items, i)
parser_docx_part(part, doc, content_items, i)
i = i + 1
part = next(it, None)


Loading…
取消
儲存