mlx-bun library API
    Preparing search index...
    • Deterministically repair footnote integrity (ported from lucien normalize-footnotes.ts, extended to merge duplicate conv:HASH defs): drop orphan markers and orphan defs, collapse two defs that cite the same conversation into the earlier one, then renumber the survivors 1..k in order of first body appearance. A bijective, duplicate-free article is returned byte-identical (no-op), hence idempotent. Throws only if the post-condition (checkFootnoteIntegrity) fails — the orchestrator catches that.

      Parameters

      • article: string

      Returns NormalizeFootnoteResult