rehan953 commited on
Commit
9e49eb8
·
verified ·
1 Parent(s): 69880fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -897,6 +897,13 @@ def _fix_fused_keyvalue_rows(grid):
897
  new_grid.append(row)
898
  continue
899
 
 
 
 
 
 
 
 
900
  m = _FUSED_KV_RE.match(first)
901
  if not m:
902
  new_grid.append(row)
 
897
  new_grid.append(row)
898
  continue
899
 
900
+ # Guard: skip rows containing a # followed by digits or X-patterns
901
+ # (card/account number labels like "Card account # XXXX XXXX XXXX 2889")
902
+ # These are separator rows reconstructed by Fix5, not fused KV rows.
903
+ if re.search(r"#\s*[\dX]", first):
904
+ new_grid.append(row)
905
+ continue
906
+
907
  m = _FUSED_KV_RE.match(first)
908
  if not m:
909
  new_grid.append(row)