Bug 491436

Summary: Nix syntax is missing strings in attribute access
Product: [Frameworks and Libraries] frameworks-syntax-highlighting Reporter: kde
Component: syntaxAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: walter.von.entferndt
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Wrong highlight and correct behaviour after adding the line

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