Riksdagsmonitor Intelligence Platform โ€” API Documentation - v1.0.30
    Preparing search index...

    Function stripBodyDuplicateSections

    • Strip the markdown-based "Reader Intelligence Guide" table and the "Article Sources" appendix from the article body. These sections are injected by the aggregator in English-only; the renderer emits properly localized, styled HTML versions via chrome, so the markdown duplicates must be removed to avoid showing the same content twice (once untranslated, once translated).

      Matches:

      • ## Reader Intelligence Guide (any case) + all content until the next H2 or end-of-string.
      • ## Article Sources + all content until the next H2 or end-of-string.

      Exported for testability.

      Parameters

      • body: string

      Returns string