From a1c50cfd96cdf40c624918b8a5f77729a1b67e54 Mon Sep 17 00:00:00 2001 From: Claude Dev Date: Wed, 25 Mar 2026 01:50:47 +0100 Subject: [PATCH] Fix: Description vom Deckblatt entfernt + Code-Fence Bereinigung im Parser - Deckblatt zeigt nur noch Titel, Typ, Klassifizierung (keine Description) - Parser entfernt Markdown Code-Fences vor JSON-Parsing --- src/report_generator.py | 5 +++++ src/report_templates/report.html | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/report_generator.py b/src/report_generator.py index 789a57c..e2d70cf 100644 --- a/src/report_generator.py +++ b/src/report_generator.py @@ -153,6 +153,11 @@ LAGEBILD: # Robuster Parser: Akzeptiert JSON, Markdown-Listen oder Freitext lines = [] text = result.strip() + # Code-Fences entfernen (```json ... ```) + if text.startswith("```"): + text = re.sub(r"^```\w*\n?", "", text) + text = re.sub(r"\n?```$", "", text) + text = text.strip() # Fall 1: JSON-Antwort (Haiku gibt manchmal JSON zurück) if text.startswith("{"): diff --git a/src/report_templates/report.html b/src/report_templates/report.html index 14e9cac..3a2b4a3 100644 --- a/src/report_templates/report.html +++ b/src/report_templates/report.html @@ -76,7 +76,7 @@ tr:nth-child(even) { background: #f8f9fa; }
{{ incident_type_label }}
{{ incident.title }}
-
{{ incident.description or '' }}
+
{{ classification_label }}
Stand: {{ report_date }}