Announcement

Collapse
No announcement yet.

How do I ignore white space in a 2 way text file comparision

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I ignore white space in a 2 way text file comparision

    I using version 3.2.3 and doing a tex file comparision of two xml files, but I'm unable to get it to ignore the whitespace differences. I have gone into the the session settings->Importance tab ans selelected
    "Default text"
    and checked both Leading whitespace adn Trailing whitespace.

    The I click the show differences icon, but the whitespace differences are still displayed. How can I ignore these and get them filtered out of my view?

  • #2
    Hello,

    First, I would suggest enabling the View menu -> Show Whitespace to see the physical whitespace characters. The goal is to get them to be a blue color instead of red, and blue colors can be hidden with the Ignore Unimportant Differences toggle in the toolbar.

    In the Importance tab, checked items are Important. You will want to Uncheck the items to mark them as Unimportant/Blue.

    If they are still not blue, click into the whitespace area (not highlight or select, but just the blinking cursor). In the bottom status bar of the individual pane, it should show the detected grammar type the cursor is currently in. If you are in a String, for example, the string is defined from " to ", and would include the whitespace. You would need to mark Strings as Unimportant as well, or delete the String grammar element (reverting it to Default Text and Whitespace).
    Aaron P Scooter Software

    Comment


    • #3
      Aaron:

      thanks for our reply. I had View->visable whitespace selected and I can see the white spaces characters.

      If I go to sessions -> session settings -> importance and under default text, unselect the Leading whitespace and trailing whitespace checkboxes, then the visable whitespace character are not marked blue (at least the differences), but are gray.

      When I clcik into the whitespace it appears as default text.

      Differences are shaded red. Ultimately, I do not evebn want to see the lines that contains differences in white lines characters. I do not care about them, but they appear when I have the red equal sign with the red line thiough it Icon (i.e. show differences) selected.

      How can I remove these lines from my view?

      Comment


      • #4
        The first step is to make sure any whitespace characters show up as black/gray, and not Red. Any blue whitespaces differences can be hidden as black/gray if the Ignore Unimportant Differences toggle is enabled.

        The Show Differences display filter will show only lines with red text or blue text on them, so if the whitespace was the only difference and it is configured to be shown as black, then it will be hidden from view.

        Are all whitespace characters (spaces, tabs) currently black with Ignore Unimportant Differences enabled? Are some blue? Or Red? Which text is still marked as Red that you need to hide?

        Please note that Line Breaks are always important. If your text is on two different lines, then this strategy will not help with this comparison.
        Aaron P Scooter Software

        Comment


        • #5
          I have exactly the same problem when comparing SQL files.

          If I change the file type from 'Detected (SQL)' to '<default>', the 'Embedded whitespace' setting works correctly. If I change it back to 'Detected (SQL)', the 'Embedded whitespace' setting has no effect.

          I'm using Beyond Compare 3.2.4.

          Comment


          • #6
            If you click the cursor in between two whitespace characters, you should see the detected grammar in the bottom status bar of each pane. If your whitespace is within a String, for example, then the whitespace options will not affect it; only the String option will.

            Which grammar type is your whitespace currently detecting as?
            Aaron P Scooter Software

            Comment

            Working...
            X