Issue #8673 new

Add syntax highlighting to commits, pull requests and diffs (BB-3046)

Bitbucket Bot
created an issue

See BB-9794

Comments (12)

  1. Alexander Sarkisov

    Erik van Zijst, in #9238 you mention one of the reasons for not implementing syntax highlighting in diffs, that is—necessity to load the whole file to correctly highlight it. What about enabling highlighting in side-by-side diffs only? In the latter case the whole file is loaded anyway.

  2. Erik van Zijst staff

    In the latter case the whole file is loaded anyway.

    Actually, it's not. In side-by-side only the chunk that contains the visible portion is loaded. You can see this on large files when you quickly scroll down. You'll see that missing pages are swapped in through AJAX.

  3. Samir Patel

    Its a huge PITA to read large PRs that are all in green!!! Again, github is doing it! You don't need the entire file to syntax highlight, you need to know the file type, which you do, and apply the highlighter to just that piece.

  4. Log in to comment