Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-14063

ASCII whitespace characters can cause the side-by-side diff to show line numbers incorrectly

    XMLWordPrintable

Details

    Description

      Git is treating FORM_FEED as a standard whitespace character and not counting it as a newline, but somewhere in our Side-by-side code we treat it as a newline, then the side-by-side diff we end up showing is all kinds of wrong because the line numbers are all off.

      A line of the file that contains U+000C is correctly counted as one line in the “View file” view, but incorrectly counts as two lines in the “Side-by-side diff” view.

      Characters such as U+0009, U+000C, U+0020, U+2009, etc. are all valid white space in Unicode text files, and should not cause inconsistent line counts. Only U+000A LINE FEED should cause the line count to increase.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jyowell Jesse Yowell (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: