EU Parliament Monitor — API Documentation - v0.8.43
    Preparing search index...

    Module Aggregator/CleanArtifact

    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):

    1. Strip leading YAML front-matter (---\n…\n---\n).
    2. Strip ISMS/owner/classification banners (emoji rows, shields.io badges, <p align="center"> blocks, and the separator --- that usually follows them).
    3. Remove the artifact's own H1; the aggregator owns the document outline.
    4. Demote every remaining heading by one level (H2→H3, etc.) so the aggregate has a single H1.
    5. Rewrite repo-relative links/images to absolute GitHub URLs so the published HTML is portable.
    6. Deduplicate mermaid fence bodies on a per-document basis (caller-owned state) — identical blocks are replaced with a reference comment.

    Functions

    githubBlobUrl
    githubRawUrl
    stripFrontMatter
    stripBanners
    stripSpdxTags
    demoteHeadings
    dedupMermaid
    cleanArtifact

    Interfaces

    CleanArtifactOptions
    CleanArtifactResult