LIne-breaks?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sderose
    New User
    • May 2007
    • 1

    LIne-breaks?

    I often see tons of diffs that I'd like not to see, that merely consist of re-breaking lines (mostly this is XML/XSL files). I have everything checked under files comparison riles, but apparently when it says 'whitespace includes line endings', that only means cr=lf=crlf, not that a line broken into two lines doesn't count as a diff. Is there any way around this? It would save me *so* much time!

    Thanks!
  • Chris
    Team Scooter
    • Oct 2007
    • 5538

    #2
    Re: LIne-breaks?

    It isn't possible to show a line broken into two lines as a match using the current version of Beyond Compare. We're considering this feature for a future release.

    For XML file comparison in the current version of Beyond Compare, you might get good results using the HTML Tidy/XML Tidy rule from our Additional File Viewer Rules page. It will standardize the formatting of XML files before opening them for comparison.

    You can get the HTML Tidy/XML Tidy rule from:
    http://www.scootersoftware.com/downl...c=kb_morerules
    Chris K Scooter Software

    Comment

    • Guest's Avatar

      #3
      Re: LIne-breaks?

      I browsed the forum today to find a solution exactly for the situation sderose described. I'll try out HTML Tidy as you suggested, but what I actually need for XML based formats is exactly what the option suggests it does, i.e. to treat line end as whitespace.

      So please add my vote to that feature in your feature list.

      Andy

      Comment

      • Guest's Avatar

        #4
        Re: LIne-breaks?

        I tried XMLTidy and it solves the problem reasonably, and without any impact to usability. Thanks!!

        Andy

        Comment

        • lchapon
          New User
          • Aug 2007
          • 2

          #5
          Re: LIne-breaks?

          "Lots of red" here too when reformatting source code, drowning the actual few important changes = making Beyond Compare useless in that situation !

          Being able to consider line-breaks as unimportant differences (or to ignore them altogether) would be more than just a cute little addition.

          Just my 0.02 €
          Thanks

          Comment

          • Guest's Avatar

            #6
            Re: LIne-breaks?

            I agree. A comparison tool that treats line feeds/carriage returns as differences is no use to me whatsoever.

            My quest to find a comparison tool that does what I need continues....

            Comment

            • SarekOfVulcan
              New User
              • Feb 2008
              • 1

              #7
              Re: LIne-breaks?

              Another vote for this one too, please. I have a file where I'm breaking the input at particular locations. I shouldn't be changing anything else in one particular section of the file, so I'd like to be able to compare it and make sure the line breaks are the only change.

              Comment

              • lchapon
                New User
                • Aug 2007
                • 2

                #8
                Any news on this really annoying line-break thing ?

                Comment

                • Chris
                  Team Scooter
                  • Oct 2007
                  • 5538

                  #9
                  Ignoring line breaks isn't possible in BC 3.0.10, our current release. We're still considering it as a possibility for a future version.
                  Chris K Scooter Software

                  Comment

                  • blueshrike
                    New User
                    • Nov 2008
                    • 1

                    #10
                    Another vote

                    My use case. I have a text file that was converted from PDF that inserted line breaks within lines. I tried comparing it to a text file generated from a word doc. It didn't work. Of course, if the PDF to Word comparison had worked, then I wouldn't have needed this.

                    Comment

                    • Aaron
                      Team Scooter
                      • Oct 2007
                      • 15997

                      #11
                      Beyond Compare 2 can only run one Rule at a time (either word conversion to text, or PDF conversion to text).

                      Beyond Compare 3 can trigger independent File Formats on either side. This still requires the Word doc and PDF to be converted to text, but the conversion can be done automatically using your custom command lines, or our available File Formats (built-in or available on the website).
                      http://www.scootersoftware.com/downl...kb_moreformats
                      Aaron P Scooter Software

                      Comment

                      • CarlB
                        Visitor
                        • Mar 2009
                        • 8

                        #12
                        Hello,

                        I know this is an old thread, but I ran into this issue today (not being able to treat line breaks as white space). This can make large diffs of many code files (C/C++ in my case) where the author has made stylistic changes, such as changing:

                        int
                        func(char c);

                        to:

                        int func(char c);

                        ... much harder to find important changes. IMO if the language considers it unimportant, we should have the option of defining it as unimportant. Maybe allowing the user to define what "white space" means for a given file type would resolve this issue?

                        Apologies if this has been resolved already, but I searched the options, help files, and this forum and didn't find anything indicating otherwise. If it's not been resolved yet, I would ask you to please consider it again. Given that it's been a few years since it was initially brought up, my guess is that it's not a trivial problem to solve, but it would be great to have some sort of update on this.

                        Thanks,

                        Carl

                        Comment

                        • Aaron
                          Team Scooter
                          • Oct 2007
                          • 15997

                          #13
                          Hello,

                          Linebreaks within a file are are still always important to the comparison, and are not ignore-able like a space or tab character. It is a non-trivial project, so while it is something we would like to tackle we do not have a timeframe for it.

                          Our current workaround is to use a pre-process to normalize the line breaks and whitespace within a file. We have some examples for HTML, XML, and Java in our additional downloads for BC3's file formats (the Tidied variants), but I am not familiar with one for C++. If you know of one, please let us know; you can create a custom file format that uses it by following an example like this:
                          http://www.scootersoftware.com/suppo...rnalconversion
                          Aaron P Scooter Software

                          Comment

                          • CarlB
                            Visitor
                            • Mar 2009
                            • 8

                            #14
                            Thanks for the reply, Aaron. I don't know of any tools to normalize C/C++, but if I find one I'll be sure to post it.

                            Carl

                            Comment

                            • tlscales
                              Expert
                              • Oct 2007
                              • 74

                              #15
                              C/C++ normalization

                              Have you looked at Polystyle (http://www.polystyle.com/)?
                              Last edited by Chris; 08-Jul-2011, 05:33 PM. Reason: Fixed broken link.

                              Comment

                              Working...