Skip to content

Type Editor


Type Editor / @type-editor/changeset / compute-diff

compute-diff

Functions

FunctionDescription

computeDiff

Compute the difference between two fragments using Myers' diff algorithm.

This implementation optimizes by first scanning from both ends to eliminate unchanged content, then applies the Myers algorithm to the remaining content. For performance reasons, the diff computation is limited by MAX_DIFF_SIZE.