git » alan.git » commit 5e2c597

Format section headings as HTML to avoid markdown hashes in PDF

author Alan Dipert
2025-12-04 05:10:16 UTC
committer Alan Dipert
2025-12-04 05:10:16 UTC
parent f06fbc91f9eee3aac3dd8911b1ef9083289b7159

Format section headings as HTML to avoid markdown hashes in PDF

render_text.py +1 -1

diff --git a/render_text.py b/render_text.py
index 8b24153..bbe843f 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"## Section {section['id']}")
+        lines.append(f"<h2 style=\"page-break-after: avoid;\">Section {section['id']}</h2>")
         for intro in section.get("intro_text", []):
             lines.append(intro)
             lines.append("")