Example: Try the following in QML: property string example: "ex" property string /* a comment */ example2: "ex" OBSERVED RESULT The comment delimiters aren't followed, and the comment is not treated as a comment, causing the syntax highlighting to break for the line. The syntax highlighting file has the following context block: <context attribute="Normal Text" lineEndContext="#pop" name="Property"> <WordDetect attribute="Property Type" context="#stay" String="alias" /> <keyword attribute="Property Type" context="#stay" String="types" /> <DetectSpaces /> <DetectIdentifier /> <DetectChar char=":" context="#pop" /> </context> EXPECTED RESULT The comment is ignored by the syntax-highlighting engine in matching parts of the context. SOFTWARE/OS VERSIONS KDE Frameworks Version: 5.106
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/502
Git commit 7df42d60f8ab997da0ce4caa29cf4497e33c2299 by Christoph Cullmann, on behalf of Jonathan Poelen. Committed on 12/07/2023 at 21:20. Pushed by cullmann into branch 'master'. QML: fix comments in property M +9 -0 autotests/folding/highlight.qml.fold M +9 -0 autotests/html/highlight.qml.dark.html M +9 -0 autotests/html/highlight.qml.html M +9 -0 autotests/input/highlight.qml M +9 -0 autotests/reference/highlight.qml.ref M +4 -2 data/syntax/qml.xml https://invent.kde.org/frameworks/syntax-highlighting/-/commit/7df42d60f8ab997da0ce4caa29cf4497e33c2299
*** Bug 483329 has been marked as a duplicate of this bug. ***