Shami96 commited on
Commit
ae4477c
·
verified ·
1 Parent(s): 6f54dab

Update updated_word.py

Browse files
Files changed (1) hide show
  1. updated_word.py +7 -1
updated_word.py CHANGED
@@ -969,7 +969,13 @@ def process_tables(document, flat_json):
969
 
970
  if has_management and has_details:
971
  print(f" 📋 Detected Management Summary table")
972
- summary_replacements = handle_management_summary_table(table, flat_json)
 
 
 
 
 
 
973
  replacements_made += summary_replacements
974
  continue
975
 
 
969
 
970
  if has_management and has_details:
971
  print(f" 📋 Detected Management Summary table")
972
+ # Process each cell in the table to find red text and apply the existing fix
973
+ summary_replacements = 0
974
+ for row_idx, row in enumerate(table.rows):
975
+ for cell_idx, cell in enumerate(row.cells):
976
+ if has_red_text(cell):
977
+ cell_replacements = handle_management_summary_fix(cell, flat_json) # ✅ Use existing function
978
+ summary_replacements += cell_replacements
979
  replacements_made += summary_replacements
980
  continue
981