Fix code highlight on the compare revisions page
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 |
---|---|
![]() |
![]() |
How to set up and validate locally
- Deploy this branch to a local development environment
- Go to the compare revision view on a project (
/-/compare
), then compare two branches. - 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.
-
I have evaluated the MR acceptance checklist for this MR.