scottgonzalez / pretty-diff

colorized HTML diffs
MIT License
218 stars 27 forks source link

Word diffs #12

Open scottgonzalez opened 10 years ago

scottgonzalez commented 10 years ago

There's already a branch for this, but I can't figure out good logic for determining what a "word" is. Looking into the logic used for git instaweb might provide some insight.

jzaefferer commented 9 years ago

:+1: for this feature.

I'm not sure how git instaweb helps, that seems to be mostly a bash script that integrates various web servers: https://github.com/git/git/blob/398dd4bd039680ba98497fbedffa415a43583c16/git-instaweb.sh

I've looked around for any details or even open source projects from GitHub's implementation. The closest I could find is this blog post, but that mostly talks about split view diffs: http://markdotto.com/2014/09/04/shipping-githubs-split-diffs/

I've asked the author if there are any plans to open source something: https://twitter.com/bassistance/status/577811088269565952

Maybe one day this will find results: https://github.com/github?query=diff

jzaefferer commented 9 years ago

One more thing, for QUnit we're looking into using Google's diff-patch-match library (at least parts of it): https://github.com/jquery/qunit/pull/772 - not sure if that would help here though.

scottgonzalez commented 9 years ago

I don't really want to stray from using git diff as that means I'd either have to drop support for all of the existing functionality or re-implement it myself. So using diff-patch-match isn't an option.