Bug 491436 - Nix syntax is missing strings in attribute access
Summary: Nix syntax is missing strings in attribute access
Status: RESOLVED FIXED
Alias: None
Product: frameworks-syntax-highlighting
Classification: Frameworks and Libraries
Component: syntax (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-08 14:20 UTC by kde
Modified: 2024-08-21 20:52 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Wrong highlight and correct behaviour after adding the line (6.88 KB, image/png)
2024-08-08 14:20 UTC, kde
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kde 2024-08-08 14:20:36 UTC
Created attachment 172400 [details]
Wrong highlight and correct behaviour after adding the line

In nix attribute names can be arbitrary strings and so some attribute names must be quoted. This is currently not correctly recognized in the syntax higlighting.

I think what is missing is a line in the "Set Access" context:

<DetectChar char="&quot;" attribute="String" context="#pop!String" />
Comment 1 Bug Janitor Service 2024-08-21 20:19:41 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/651
Comment 2 Christoph Cullmann 2024-08-21 20:52:49 UTC
Git commit 1d94eb693cfe32f53420fae51a8a6892740a7341 by Christoph Cullmann, on behalf of Jonathan Poelen.
Committed on 21/08/2024 at 20:50.
Pushed by cullmann into branch 'master'.

Nix: fix string in attribute access

M  +2    -0    autotests/folding/test.nix.fold
M  +2    -0    autotests/html/test.nix.dark.html
M  +2    -0    autotests/html/test.nix.html
M  +2    -0    autotests/input/test.nix
M  +2    -0    autotests/reference/test.nix.ref
M  +2    -1    data/syntax/nix.xml

https://invent.kde.org/frameworks/syntax-highlighting/-/commit/1d94eb693cfe32f53420fae51a8a6892740a7341