According to the Wiki, I should implement diff_lineMode() as
indicated:
http://code.google.com/p/google-diff-match-patch/wiki/LineOrWordDiffs
I also note that there is already a diff_lineMode() in the library. So
anyway, I did implement it as:
[code]
public List<Diff> diff_lineMode(string text1, string text2) {
// Scan the text on a line-by-line basis first.
Object[] b = diff_linesToChars(text1, text2);
text1 = (string)b[0];
text2 = (string)b[1];
List<string> linearray = (List<string>)b[2];
List<Diff> diffs = diff_main(text1, text2, false);
// Convert the diff back to original text.
diff_charsToLines(diffs, linearray);
// Eliminate freak matches (e.g. blank lines)
diff_cleanupSemantic(diffs);
return diffs;
}
[/code]
Using this, I still end up with diffs with less than line granularity.