desktop / desktop/desktop

Syntax highlighting gets messed up when enabling "Ignore Whitespace"

Open
#21,885 5 comments 0 reactions 0 assignees View on GitHub
bug priority-2
Dominant language
TypeScript
Stars
21.8k
Forks
10.5k
Avg merge
1d 15h
Merged PRs (30d)
25

Description

### The problem

When I enabled the option to ignore whitespace, the syntax highlighting seems to get a bit wonky. Here, "isStatic" has three different colours, and the subsequent line also has odd colouring.

Image

If I untick ignore whitespace, everything returns to normal:

Image

(if it matters, the language here is Dart)

### Release version

Version 3.5.6 (x64)

### Operating system

Windows 11 Pro

### Steps to reproduce the behavior

- Modify a file
- Review the diff in GitHub desktop
- Enable the "Ignore Whitespace" option in the diff viewer

### Log files

_No response_

### Screenshots

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.