Skip to content

Commit

Permalink
format code
Browse files Browse the repository at this point in the history
  • Loading branch information
Hisir0909 committed Dec 26, 2024
1 parent 32cde81 commit d503233
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/core/workflow/nodes/document_extractor/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,12 @@ def _extract_text_from_doc(file_content: bytes) -> str:
# Process sorted content
for _, item_type, item in content_items:
if item_type == "paragraph":
text.append(item.text)
if isinstance(item,Paragraph):
text.append(item.text)
elif item_type == "table":
# Process tables
if not isinstance(item,Table):
continue
try:
# Check if any cell in the table has text
has_content = False
Expand Down

0 comments on commit d503233

Please sign in to comment.