Skip to content

Fix code highlight on the compare revisions page

Ben King requested to merge benjaminking-fix-highlight-compare into master

What does this MR do and why?

This MR aims to address Branch compare diff visualization does not visu... (#386700 - closed), which appears to be caused by a regression introduced in this MR. Similar MRs have been brought forward to fix the same highlighting bug in other areas of the UI including:

Specifically, this MR uses the same logic from !107569 (merged) to correct the problem in the compare revisions page.

Screenshots or screen recordings

Before After
on-master on-branch

How to set up and validate locally

  1. Deploy this branch to a local development environment
  2. Go to the compare revision view on a project (/-/compare), then compare two branches.
  3. Confirm that the highlighting is working as expected.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports