fix(orion): correct report numbering toc and first page

This commit is contained in:
Schubert Ferenc 2026-07-11 12:48:01 +02:00
parent 503b343070
commit 47f54d3461
7 changed files with 283 additions and 137 deletions

View file

@ -41,5 +41,12 @@ def table(headers: list[str], rows: list[list[Any]], css_class: str = "") -> str
return f"<table class=\"data-table {css_class}\"><thead><tr>{head}</tr></thead><tbody>{body}</tbody></table>"
def section(chapter_id: str, title: str, body: str) -> str:
return f"<section class=\"chapter\" id=\"{text(chapter_id)}\"><h2>{text(title)}</h2>{body}</section>"
def section(chapter_id: str, title: str, body: str, bookmark_label: str | None = None) -> str:
bookmark_attr = (
f' data-bookmark-label="{text(bookmark_label)}"' if bookmark_label is not None else ""
)
heading = bookmark_label or title
return (
f'<section class="chapter" id="{text(chapter_id)}">'
f'<h2 class="chapter-title"{bookmark_attr}>{text(heading)}</h2>{body}</section>'
)