Bug 493459 - Swift code is highlighted wrong after a protocol ending in a method declaration
Summary: Swift code is highlighted wrong after a protocol ending in a method declaration
Status: RESOLVED FIXED
Alias: None
Product: frameworks-syntax-highlighting
Classification: Frameworks and Libraries
Component: syntax (show other bugs)
Version: 6.6.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-21 23:06 UTC by Nasado
Modified: 2024-09-22 18:45 UTC (History)
1 user (show)

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


Attachments
Badly highlighted sample code (187 bytes, text/plain)
2024-09-21 23:06 UTC, Nasado
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nasado 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