Bug 483329 - QML: syntax-highlighting does not allow comments during property definitions
Summary: QML: syntax-highlighting does not allow comments during property definitions
Status: RESOLVED DUPLICATE of bug 469873
Alias: None
Product: frameworks-syntax-highlighting
Classification: Frameworks and Libraries
Component: syntax (other bugs)
Version First Reported In: 5.115.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-12 10:45 UTC by Jack Hill
Modified: 2024-03-12 10:48 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Hill 2024-03-12 10:45:25 UTC
SUMMARY
It is common to document a type like

    property var /*ComplexDataType*/ myData
    property int /*MyEnum*/ enumValue

but the syntax-highlighting engine does not seem to detect the comments here. This happens when putting a comment anywhere between the word "property" and either the matching colon or a new line (whichever comes first).

STEPS TO REPRODUCE
1. Open a new qml file in Kate
2. Enter the following code:

    property /*Comment1*/ var myData: xyz
    property var /*Comment2*/ myData: xyz
    property var myData /*Comment3*/: xyz
    property var myData: /*Comment4*/ xyz
    property var myData /*Comment5*/

OBSERVED RESULT
Only Comment4 is displayed as a comment

EXPECTED RESULT
All comments should be displayed as a comment

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20240306
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.12
Kernel Version: 6.7.7-1-default (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
Comment 1 Jack Hill 2024-03-12 10:48:05 UTC
*** This bug has been marked as a duplicate of bug 469873 ***