Open
Description
This is a feature request.
Given a common ancestor and 2 sets of patches, provide a merged document that may include conflicts to resolve manually.
This would be useful to allow two or more users collaborate on the edition of a document, implementing an equivalent of git merge.
It is assumed that the most recent common ancestor is know and provided as a parameter:
JsDiff.merge( commonAncestor, x_patches, y_patches [, options] )
Where x_patches and y_patches are Arrays of patches for the x and y branches from the common ancestor,
Options may be used to provide a manual merge patterns which could default to:
mergePattern: [ "<<<<<<< x", "=======", ">>>>>>> y" ]
For the algorithm, see https://www.quora.com/How-does-Git-merge-work.