diff-match-patch icon indicating copy to clipboard operation
diff-match-patch copied to clipboard

Diffing sequence of tokens instead sequence of characters

Open ndvbd opened this issue 6 years ago • 0 comments

I need to diff a sequence of tokens instead of a sequence of characters. Is there a solution for it? So basically every token is either a sequence of characters, or some object, it doesn't matter, as long as you can compare two tokens and say if they are equal or not.

So I need the same solution of diff-match-patch, but a more generalized one: instead of restricting the algorithm to work on a sequence of characters, to work on a sequence of any kind of (comparable) objects.

Is the python difflib library as efficient as diff-match-patch?

ndvbd avatar Mar 07 '18 22:03 ndvbd