diff-match-patch
diff-match-patch copied to clipboard
Can patch support line-based?
Can patch support line-based or word-based?
I'd like to use it to generate unified format just like git diff's ouput
Hmm, I've found a private method on the java version that seem to exactly do that, I'm not sure though https://github.com/google/diff-match-patch/blob/62f2e689f498f9c92dbc588c58750addec9b1654/java/src/name/fraser/neil/plaintext/diff_match_patch.java#L286
every library should have a line-mode diffing option, which may be used in normal operation if the input documents are long enough
the libraries also expose patch_toText as described in the wiki if you are wanting standard diff output