Skip to content

Commit

Permalink
🔧 fix(paragraph_finder): Skip paragraphs with debug information
Browse files Browse the repository at this point in the history
- Enhance paragraph filtering logic to skip paragraphs with debug information
- Prevent processing of paragraphs containing debug-related character styles
- Improve paragraph composition detection and filtering
  • Loading branch information
awwaawwa committed Feb 10, 2025
1 parent 880b165 commit 96bec55
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions yadt/document_il/midend/add_debug_information.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ def process_page(self, page: il_version_1.Page):
new_paragraphs = []

for paragraph in page.pdf_paragraph:
if not paragraph.pdf_paragraph_composition:
continue
if any((x.pdf_same_style_unicode_characters.debug_info for x in paragraph.pdf_paragraph_composition if x.pdf_same_style_unicode_characters)):
continue
# Create a rectangle box
Expand Down

0 comments on commit 96bec55

Please sign in to comment.