@gmb/bitmark-parser - v7.2.0
    Preparing search index...

    Function diff

    • Semantic diff of two documents (PLAN-179). Both sides are re-canonicalized and compared as bit JSON; every difference is rendered as the canonical bitmark an author would type. Bits are paired by id, then by sourceBB on the same sourceRL, then by exact content, then by text similarity.

      Parameters

      • a: string

        The old document (bitmark or JSON).

      • b: string

        The new document (bitmark or JSON; the formats need not match).

      • options: DiffOptions = {}

        Diff options; outputFormat selects the unified-style text (default), the per-bit JSON, or an applyable patch document.

      Returns string

      The diff in the selected format — empty text, an array of unchanged bits, or a patch document with no entries when the two are semantically equal.

      If the active variant was built without diff, or on a conversion error.