youssefreda9 commited on
Commit
1e65c93
·
1 Parent(s): b4e2427

Fix structured data regex bug in spelling rules

Browse files
Files changed (1) hide show
  1. src/nlp/spelling/araspell_rules.py +1 -1
src/nlp/spelling/araspell_rules.py CHANGED
@@ -633,7 +633,7 @@ class OutputValidator:
633
 
634
  # ── Protect Structured Data ──
635
  # Reject spelling modifications to English, JSON, URLs, Emails, Hashtags
636
- if re.search(r'[a-zA-Z]|\{.*\}|\[.*\]|<.*>|#\S+|@\S+', original):
637
  if original != corrected:
638
  return False, "structural_protection"
639
 
 
633
 
634
  # ── Protect Structured Data ──
635
  # Reject spelling modifications to English, JSON, URLs, Emails, Hashtags
636
+ if re.search(r'[a-zA-Z]|\{|\[|<|#|@|://', original):
637
  if original != corrected:
638
  return False, "structural_protection"
639