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

    Module Aggregator/Metadata/BriefingHighlightSections

    Section walker primitives for briefing-highlight.ts. Extracted as a sibling leaf module so the public extractor surface stays below the 600-line drift-guard cap (see test/unit/source-file-size.test.js). The walkers are pure — every function takes (markdown body, section-needle list, language) and returns a structural fragment with no I/O or upward imports.

    Three walker shapes are exported:

    • extractFirstSubsectionUnderSection — first ### … heading + paragraph inside the first matched ## … block (used by the Strategic-synthesis and Top-findings extractors).
    • extractFirstParagraphUnderSection — first prose paragraph inside the matched ## … block, ignoring ### … sub-headings (used by Reader-Briefing paragraph fallbacks and Strategic-paragraph derivation).
    • extractFirstNumberedItemUnderSection — first 1. **Label**: … list item inside the matched ## … block (used by the May-2026 Reader-Briefing priority-list style).

    The stripTradecraftLabels helper is exported too — both this module and briefing-highlight.ts need it to normalize sub-headings before they reach the headline / description surface.

    Functions

    stripTradecraftLabels
    extractFirstSubsectionUnderSection
    extractFirstParagraphUnderSection
    extractFirstNumberedItemUnderSection