Normalise a single analysis-artifact Markdown file so it can be
merged into the aggregate document without producing duplicate banners,
competing H1 headings, or broken relative links.
Applied transformations (in order):
Strip leading YAML front-matter (---\nā¦\n---\n).
Strip ISMS/owner/classification banners (emoji rows, shields.io badges,
<p align="center"> blocks, and the separator --- that usually
follows them).
Remove the artifact's own H1; the aggregator owns the document outline.
Demote every remaining heading by one level (H2āH3, etc.) so the
aggregate has a single H1.
Rewrite repo-relative links/images to absolute GitHub URLs so the
published HTML is portable.
Deduplicate mermaid fence bodies on a per-document basis (caller-owned
state) ā identical blocks are replaced with a reference comment.
Description
Normalise a single analysis-artifact Markdown file so it can be merged into the aggregate document without producing duplicate banners, competing H1 headings, or broken relative links.
Applied transformations (in order):
---\nā¦\n---\n).<p align="center">blocks, and the separator---that usually follows them).