CodeMirror Blob: ensure occurrences are single lines and non-overlapping
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
App preview:
Check out the client app preview documentation to learn more.