Skip to content
Snippets Groups Projects

CodeMirror Blob: ensure occurrences are single lines and non-overlapping

Closed Warren Gifford requested to merge olafurpg/cm-overlaps into main

Created by: olafurpg

Towards #40551

Our old CodeMirror Blob logic assumed that all highlighting
occurrences enclosed a single line and had no overlaps between them,
while the syntect server regularly returned multiline
occurrences with potential overlaps. This commit updates the
logic to split multiline and overlapping occurrences the
assumption is correct resulting in improved highlighting.

This commit does not fix all highlighting issues with the new blob view,
we still need to support more "scopes" from syntect, and we need to
refine the actual CSS colors for the SCIP syntax kind classes.

Test plan

Ran the server locally and manually verified that the syntax highlighting has improved for the CodeMirror blob view

Before

CleanShot 2022-08-19 at 13 18 05

After CleanShot 2022-08-19 at 14 42 56

App preview:

Check out the client app preview documentation to learn more.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading