Ignoring white-space difference

Support for our DiffMerge utility.

Moderator: SourceGear

Post Reply
Airis
Posts: 1
Joined: Mon Sep 24, 2012 12:57 am

Ignoring white-space difference

Post by Airis » Mon Sep 24, 2012 1:03 am

I want to ignore white-space differences.

I have a couple of examples of lines I want to consider as equal lines:

1a) if($foo=="bar")
1b) if ($foo == "bar")

2a) $foo='b'.'a'.'r';
2b) $foo = 'b' . 'a' . 'r';

Is there a way I can treat a's and b's as equals?

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Ignoring white-space difference

Post by Beth » Mon Sep 24, 2012 9:21 am

In the Diff/Merge Tools - Options, edit your Default Ruleset. Click on Line Handling and check the option to Ignore/Strip Whitespace when Matching Lines. Next, Click on Content Handling and make sure that the option "Whitespace is important" is unchecked. Then do the same for the particular file types you might be working with that have their own rulesets.
Beth Kieler
SourceGear Technical Support

Post Reply