jsdiff
jsdiff copied to clipboard
A javascript text differencing implementation.
3-way merge
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...
It seems https://github.com/kpdecker/jsdiff/blob/3b654c2ed7d5262ed9946de841ad8dae990286c7/src/diff/base.js does not implement "4b. A Linear Space Refinement" mentioned in Myers' paper. So the memory usage is O(D^2). From the code it looks like `O(len(bestPath) * len(components...
See https://github.com/kpdecker/jsdiff/issues/474#issuecomment-1886906877 for my analysis of why this is a good idea.
This would let us support: * languages without spaces - e.g. [Chinese, Japanese](https://github.com/kpdecker/jsdiff/pull/328) * languages where punctuation that is normally a word break can appear in the middle of a...
`Diff.diffWords` is not working on non-Latin characters like Korean.
This PR adds support for a `tokenizer` parameter which gives the user more control over what constitutes a "token". If the `tokenizer` parameter is not set then the default regex...
Surely these behaviours can't be intended? ``` > text1 = 'foo\nbar\nbaz\nqux\n' 'foo\nbar\nbaz\nqux\n' > text2 = 'foo\nbaz\nqux\n' 'foo\nbaz\nqux\n' > patch = diff.createPatch('foo.txt', text1, text2) 'Index: foo.txt\n' + '===================================================================\n' + '--- foo.txt\n'...
Maybe I'm not seeing it in the docs, but I think it would be nice to apply a Change Object, or an array of them, to a string to be...
* Are there optimizations we should nick? * Should we provide a comparison in the README as suggested by @josephrocca in https://github.com/kpdecker/jsdiff/issues/225? Key places to look seem to be: *...
Anyway to build an option to ignore punctuation in the diff?