Skip to content

Improve highlighting for merge diffs

Vasilii Iakliushin requested to merge 16950_improve_highlighting_for_diffs into master

What does this MR do?

Contributes to #285464 (closed)

Problem

Current diff detection implementation has a limitation for cases with multiple changes in the same line. It highlights the whole block instead of marking the exact difference.

Solution

Use a different diff detection algorithm to improve the detection.

Other changes

Extract char_diff.rb from ee namespace.

Screenshots (strongly suggested)

Before After
Screenshot_2021-01-26_at_16.44.27 Screenshot_2021-01-26_at_16.46.36

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Vasilii Iakliushin

Merge request reports

Loading