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 Motions → EU Parliament Motions
EU Parliament Propositions — Executive Brief → EU Parliament Propositions
EP10 Term Outlook — Executive Brief → EP10 Term Outlook
Synthesis Summary — EP Motions & Adopted Texts → EP 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.
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 Motions→EU Parliament MotionsEU Parliament Propositions — Executive Brief→EU Parliament PropositionsEP10 Term Outlook — Executive Brief→EP10 Term OutlookKey Legislative Developments — Deep Analysis (2026-05-08)→Key Legislative DevelopmentsSynthesis Summary — EP Motions & Adopted Texts→EP Motions & Adopted TextsTrailing 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.