git » alan.git » commit 3ed381e

Number sections sequentially in booklet headings

author Alan Dipert
2025-12-04 05:11:05 UTC
committer Alan Dipert
2025-12-04 05:11:05 UTC
parent 5e2c597309733690124867071638464f80cc5e03

Number sections sequentially in booklet headings

render_text.py +1 -1

diff --git a/render_text.py b/render_text.py
index bbe843f..98e01d9 100644
--- a/render_text.py
+++ b/render_text.py
@@ -46,7 +46,7 @@ def render_booklet(data: Dict[str, Any]) -> str:
 
     for sec_idx, section in enumerate(data.get("sections", [])):
         lines.append("<div style=\"page-break-after: always;\"></div>")
-        lines.append(f"<h2 style=\"page-break-after: avoid;\">Section {section['id']}</h2>")
+        lines.append(f"<h2 style=\"page-break-after: avoid;\">Section {sec_idx + 1}</h2>")
         for intro in section.get("intro_text", []):
             lines.append(intro)
             lines.append("")