codemirror / dev

Development repository for the CodeMirror editor project
https://codemirror.net/
Other
5.94k stars 376 forks source link

Bracket highlighting not working for multiple-line Python string literal concatenation #1454

Closed Nagidrop closed 1 month ago

Nagidrop commented 1 month ago

Describe the issue

When you have multiple strings on each line with at least 1 f-string that isn't on the last line, bracket highlighting doesn't work although it's valid Python string literal concatenation syntax. Bracket highlighting works properly if the f-string is on the last line.

Here's a video with the issue:

https://github.com/user-attachments/assets/2e24db2f-5637-4af5-bcb9-38dfb243de58

I think it could be a regression issue as the issue is there on https://codemirror.net/try/ but not on the older CodeMirror 5 Python mode

Browser and platform

JupyterLab Desktop 4.2.5-1, Windows 11

Reproduction link

https://codemirror.net/try/?c=aW1wb3J0IHtiYXNpY1NldHVwLCBFZGl0b3JWaWV3fSBmcm9tICJjb2RlbWlycm9yIgppbXBvcnQge3B5dGhvbn0gZnJvbSAiQGNvZGVtaXJyb3IvbGFuZy1weXRob24iOwoKbmV3IEVkaXRvclZpZXcoewogIGRvYzogInByaW50KFxuZid0ZXN0J1xuJ3Rlc3QnXG4pIiwKICBleHRlbnNpb25zOiBbYmFzaWNTZXR1cCwgcHl0aG9uKCldLAogIHBhcmVudDogZG9jdW1lbnQuYm9keQp9KQo=

marijnh commented 1 month ago

The sandbox was using an old version of @lezer/python. Upgrading seems to have fixed this.