-
Notifications
You must be signed in to change notification settings - Fork 28
Using custom string equalizers during diff #1
Conversation
…g> instances to compare lines during diffs
} | ||
return original.equals(revised); | ||
} | ||
};; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved the creation of the default Equalizer from constructor of DiffRowGenerator to its builder
Thanks for your PR. IMHO, it is better to:
|
Backwards compatibility is intact as I did not touch the publicly accessible methods. About the nullness, I pushed a fix. I won't have time to create tests, sorry about that. |
Now we have 2 classes which has to care about `ignoreWhiteSpace` and here is 2 bugs: 1. it converts `null` to empty string 2. `Builder.ignoreWhiteSpace` doesn't work when we set custom Equalizer This change solves these problem.
Well, this change has one problem; there are 2 classes which is responsible to handle My suggestion is here, how do you think? I just remove this responsibility from Equalizer. And, current your implementation converts |
Looks good. Thanks for fixing it. I did not have a look at the |
I've merged this branch to master. Thanks @andreaskumlehn. You can download artifact from Maven central later. Its version is |
Thanks a lot @eller86 :) |
Added support to inject a custom Equalizer into the builder of the DiffRowGenerator.
This modification enabled us to use regexes during diff to ignore minor diffs while comparing lines of revisions.