I sometimes want to diff the output of JS builds. The files are minified, so I first prettify them. The problem though is that sometimes small changes in the input yield hundreds of trivial changes in the output file, due to minification process assigning different variable names all over the output file.

I would like a diff tool that can ignore those small changes (that are typically 1 or 2 character diffs) and only show bigger diffs.

Is there a tool like that, or can Beyond Compare be configured like that?

A typical diff I'd like to ignore looks like this:

diff with one character per line

1

There are 1 best solutions below

4
On

You can use replacements for this.

Go to Session->Session Settings->Replacements:

enter image description here

After this the difference is unimportant: enter image description here

You may also define a replacement easier via the context menu (right mouse click)

enter image description here

The official support page contains a possibility with file formats: https://www.scootersoftware.com/support.php?zz=kb_unimportantv3