Skip to content

aidando73/bitbucket-syntax-highlighting

Repository files navigation

Bitbucket Syntax Highlighting

A browser extension to add syntax highlighting to your pull requests on Bitbucket.

Example Screenshot

Update [25 Mar 2023]

Several users have requested this feature since 2013, and finally BitBucket has announced a beta version of syntax highlighting meaning they've decided to support syntax highlighting natively. This means this extension is no longer required. Thank you to @PhenX for your contributions and all of our users. We were able to hit 150 users at the peak of it all (130 on chrome, 20 on firefox).

Why Bother?

Syntax highlighting is not just for cosmetics, it's significantly easier to read code when it's highlighted.

🙁 Before:

Before

😄 After:

After

The latter is easier to review, as there is separation between comments, variables, constants, functions, classes, keywords, etc. Therefore, this extension will:

  • ✅ Decrease the cognitive load of reviewing code
  • ✅ Decrease the time it takes to review a pull request
  • ✅ Increase the quality of the resulting review.

Consider for the above examples how difficult it would be to find a bug in the non-highlighted version compared to the highlighted version.

Usage

The extensions can be found:

Supported Languages

See the full list of supported languages here.

Syntax highlighting is done in a best effort manner using the file extension or file name. If there is a language missing or file that isn't highlighted, please let me know or submit a PR.

Credits

  • Kudos to the team at Prism.js, for their amazing work on the syntax highlighting library we use.
  • Kudos to the team at Refined Bitbucket, as much of the initial code in this extension was adapted from their extension.