You've just described dwdiff. Not the smartest diff algo, though its strong point is producing diffs of prose that are human readable. I used it as the core of a wiki with 'perfect' collision resolution. Two people could edit at the same time, and the 2nd to hit save would have their work merged in with dwdiff instead of having their work automatically discarded.