Bug 493459

Summary: Swift code is highlighted wrong after a protocol ending in a method declaration
Product: [Frameworks and Libraries] frameworks-syntax-highlighting Reporter: hatzka <kdebug>
Component: syntaxAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: walter.von.entferndt
Priority: NOR    
Version First Reported In: 6.6.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Badly highlighted sample code

Description hatzka 2024-09-21 23:06:23 UTC
Created attachment 173944 [details]
Badly highlighted sample code

SUMMARY
Swift code is highlighted wrong after a protocol ending in a method declaration.

STEPS TO REPRODUCE
1. Open the attached file in Kate or KWrite.

OBSERVED RESULT
The second comment is purple (with white slashes), as is the name of the Fruit enum.

EXPECTED RESULT
If everything above the "Something tasty" comment is removed, the comment and Fruit enum look the same.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
Comment 1 Bug Janitor Service 2024-09-22 12:39:48 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/663
Comment 2 Christoph Cullmann 2024-09-22 18:45:11 UTC
Git commit 4e76ba20fcaf3c0e6c079853fd4eec1540bbb81a by Christoph Cullmann, on behalf of Jonathan Poelen.
Committed on 22/09/2024 at 18:42.
Pushed by cullmann into branch 'master'.

Swift: fix detection of end of protocol method declaration

M  +9    -0    autotests/folding/test.swift.fold
M  +9    -0    autotests/html/test.swift.dark.html
M  +9    -0    autotests/html/test.swift.html
M  +9    -0    autotests/input/test.swift
M  +9    -0    autotests/reference/test.swift.ref
M  +26   -10   data/syntax/swift.xml

https://invent.kde.org/frameworks/syntax-highlighting/-/commit/4e76ba20fcaf3c0e6c079853fd4eec1540bbb81a