reconcile-text: conflict-free 3-way text merging

Think diff3 or git merge, but with intelligent conflict resolution that requires no user intervention. The Reconcile library tackles a fundamental challenge in collaborative editing: what happens when multiple users edit the same text simultaneously, but the conflict resolver only has access to the final results, not the intermediate steps?

Where traditional merge tools leave you with conflict markers to resolve manually, Reconcile automatically weaves changes together. The reconcile(parent, left, right) function takes conflicting edits and produces clean, unified results using an algorithm inspired by Operational Transformation. No more <<<<<<< markers cluttering your text.

The process starts with your chosen tokenisation strategy, then applies Myers' diff algorithm to compare the original with both modified versions. These diffs are optimised and transformed to preserve meaningful changes, before a final merge strategy combines all modifications without losing any edits.

Ready to dive deeper? Check out the documentation or try editing the text boxes below to see Reconcile in action.

Use the tokenisation options below to experiment with different approaches — the library also supports custom tokenisers.