I assume code somehow counts as "plain text" and not "structured content"?

112 views
Skip to first unread message

Alex Sheive

unread,
Apr 9, 2013, 4:38:55 PM4/9/13
to diff-mat...@googlegroups.com
Just wanted to make sure that there's nothing inherently silly about using diff-match-patch for, say, javascript code.  It seems to me that's the whole idea, but all of the examples seem to use prose and the wiki page that warns against using it on structured content (https://code.google.com/p/google-diff-match-patch/wiki/Plaintext) worried me that somehow the algorithms are unfriendly to syntax in general.

If there is some reason to not use them on code, I assume that goes away if I use line mode as described on the wiki https://code.google.com/p/google-diff-match-patch/wiki/LineOrWordDiffs as that seems fairly close to the standard unix diff/patch behavior.  Please let me know if I'm missing something there as well or if there are any general caveats or tips y'all know of.

Thanks,
- alex
Reply all
Reply to author
Forward
0 new messages