Skip to content

Commit

Permalink
Document the useLongestToken property.
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Sep 4, 2014
1 parent c7a5bab commit a9191cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ var JsDiff = (function() {
};

JsonDiff = new Diff();
// Discriminate between two lines of pretty-printed, serialized JSON where one of them has a
// dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output:
JsonDiff.useLongestToken = true;
JsonDiff.tokenize = LineDiff.tokenize;
JsonDiff.equals = function(left, right) {
Expand Down

0 comments on commit a9191cb

Please sign in to comment.