Diff ignoring layout
Author
Discussion

jimothy

Original Poster:

5,151 posts

267 months

Tuesday 6th December 2005
quotequote all
I've got source 2 files that have almost identical content.
However, they are differently laid out.

Does anyone know of a Diff tool that can compare these files and find differences ignoring the layout, whitespace and the fact the same code may be on different lines?

Thanks

_dobbo_

14,619 posts

278 months

Tuesday 6th December 2005
quotequote all
Don't know of anything that can do what you need - what I would do is use the replace tool in (for example) textpad To remove all spaces, tabs and CRLFs (about a 10 second job) then compare the two files using the compare function Tools->Compare files.

annodomini2

6,971 posts

281 months

Tuesday 6th December 2005
quotequote all
Winmerge

Diff and merge tool, open source and very good.

GreenV8S

31,024 posts

314 months

Tuesday 6th December 2005
quotequote all
Nomalise them using a code formatter and then compare the output.