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

    Function stripArtifactCategoryAffix

    • Strip a leading or trailing artifact-category label from a heading and return the editorial-topic core. When neither end carries a category label, the heading is returned unchanged. When the category label is the entire heading (e.g. # Executive Brief) the result is the empty string.

      Examples:

      • Executive Brief — EU Parliament MotionsEU Parliament Motions
      • EU Parliament Propositions — Executive BriefEU Parliament Propositions
      • EP10 Term Outlook — Executive BriefEP10 Term Outlook
      • Key Legislative Developments — Deep Analysis (2026-05-08)Key Legislative Developments
      • Synthesis Summary — EP Motions & Adopted TextsEP Motions & Adopted Texts

      Trailing parenthesised metadata ((2026-05-08), (May 2026)) is also stripped because it functions as a date stamp rather than editorial copy. The returned core is trimmed of whitespace and trailing punctuation.

      Parameters

      Returns string

      Editorial-topic core, or empty string when only the category survived