diff --git a/graphify/callflow_html.py b/graphify/callflow_html.py index 3c8a34b41f..f2d038e06f 100644 --- a/graphify/callflow_html.py +++ b/graphify/callflow_html.py @@ -30,7 +30,7 @@ from datetime import datetime, timezone from html import escape -from graphify.paths import GRAPHIFY_OUT, GRAPHIFY_OUT_NAME +from graphify.paths import GRAPHIFY_OUT, GRAPHIFY_OUT_NAME, write_text_atomic # ────────────────────────────────────────────── @@ -1991,14 +1991,14 @@ def write_callflow_html( """) # Write output - output = "\n".join(html) + rendered_html = "\n".join(html) output_path.parent.mkdir(parents=True, exist_ok=True) - output_path.write_text(output, encoding="utf-8") + write_text_atomic(output_path, rendered_html) # Summary - mermaid_count = output.count('
') - table_count = output.count('') - section_count = output.count('

') + table_count = rendered_html.count('

') + section_count = rendered_html.count('