EU Parliament Monitor — API Documentation - v0.9.25
    Preparing search index...
    • Post-resolution SERP-floor recovery for <title>. The internal branch inside composeContextualTitle only fires on the fallbackTitle path; titles picked from manifestTitle, englishFallbackTitle, or the H1-extracted resolvedTitleCandidate bypass it. This wrapper applies the same (EP) pad to the FINAL resolved title so short briefs (e.g. "Moties | 2026-04-01", 19 chars) clear the per-script reader floor regardless of which candidate pickFirstNonEmpty selected.

      No-op when the title already clears the floor or already contains an isolated EP token (word-boundary check — see containsEpToken). The pad is only appended when the resulting title fits inside budgetFor(lang, 'title').

      Parameters

      • title: string

        Resolved SEO title

      • lang: LanguageCode

        Target language code

      • titleBudget: number

        Per-script <title> budget (60 latin / 30 cjk / 55 rtl)

      Returns string

      Title padded to the SERP floor when feasible