EU Parliament Monitor — API Documentation - v0.9.24
    Preparing search index...
    • Heal JSON-LD description field corruption left behind by a prior version of applyArticleSeoBackfill. The old regex "description":"[^"]*" terminated at the first JSON-escaped quote (\"), so every rebuild prepended a new value in front of the previous description's tail — producing an unparseable JSON-LD block whose description value was followed by a run of repeated fragments before ,"datePublished".

      This pass is idempotent: when the JSON-LD is already well-formed, the regex [^,]* matches the empty string and the file is left unchanged. It runs unconditionally because the original backfill path skips files whose <meta name="description"> is already clean, even when their JSON-LD is corrupted.

      Parameters

      • filenames: readonly string[]

        News article filenames to inspect

      Returns number

      Number of HTML files updated