Ignore newlines with diff
There is a tool called "word diff" (tool command line must be 'wdiff') which might help. http://www.gnu.org/software/wdiff/manual/wdiff.html
You can pretty print both files using, for example, GNU Indent, http://www.gnu.org/software/indent/ , and then compare them with diff.