From c4a5cd2d8a79863db8414a3d038e26bc6fcdc9e3 Mon Sep 17 00:00:00 2001 From: Benjamin Admin Date: Fri, 20 Mar 2026 08:11:02 +0100 Subject: [PATCH] Skip garbled IPA text in single-cell heading detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unbracketed IPA continuations like "ska:f – ska:vz" were falsely detected as headings. Now _text_has_garbled_ipa() filters them out. Co-Authored-By: Claude Opus 4.6 --- klausur-service/backend/grid_editor_api.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/klausur-service/backend/grid_editor_api.py b/klausur-service/backend/grid_editor_api.py index 307ff69..5c08be7 100644 --- a/klausur-service/backend/grid_editor_api.py +++ b/klausur-service/backend/grid_editor_api.py @@ -736,6 +736,9 @@ def _detect_heading_rows_by_single_cell( text = (cell.get("text") or "").strip() if not text or text.startswith("["): continue + # Skip garbled IPA without brackets (e.g. "ska:f – ska:vz") + if _text_has_garbled_ipa(text): + continue heading_row_indices.append(ri) for hri in heading_row_indices: