Skip to content

collectPersistentBlockIdentityRepairs

collectPersistentBlockIdentityRepairs(blocks, options): PersistentBlockIdentityRepair[]

Defined in: identifiers.ts:189

Collect the persistent-id repairs required to make one document tree safe for duplicate-aware structured block workflows.

Existing non-empty ids are preserved when they are unique. Missing ids are generated, and only the later duplicates in one depth-first traversal are repaired when duplicate detection is enabled. When blockName is set, mismatched nodes are excluded from identity accounting while their nested blocks are still traversed.

readonly PersistentBlockIdentityNode[]

Current document tree rooted at the relevant editor scope.

CollectPersistentBlockIdentityRepairsOptions

Attribute key plus prefix/generator settings.

PersistentBlockIdentityRepair[]

One repair patch per block that should regenerate or seed its persistent id.