Bug 366797 - JavaScript word operators formatted inconsistently
Summary: JavaScript word operators formatted inconsistently
Status: RESOLVED FIXED
Alias: None
Product: frameworks-syntax-highlighting
Classification: Frameworks and Libraries
Component: syntax (show other bugs)
Version: unspecified
Platform: Debian stable Linux
: NOR minor
Target Milestone: ---
Assignee: KWrite Developers
URL: https://a.pomf.cat/jsougw.png
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-15 17:34 UTC by jec.bugs
Modified: 2018-07-14 17:06 UTC (History)
2 users (show)

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


Attachments
The attachment that @jec.bugs referred to. (13.02 KB, image/png)
2018-04-25 15:28 UTC, Grzegorz Szymaszek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jec.bugs 2016-08-15 17:34:27 UTC
In JavaScript files, the 'instanceof' and 'in' operators (which normally are formatted in black boldface font) sometimes appear in a normal weight purple font like variables/properties. This behavior seems to be caused by a property access with '.' (never with square bracket property access) in the left-hand operand. The bug does not seem to occur when the operand with the property access is surrounded by parentheses (see lines 3 and 7 in attached screenshot).

Reproducible: Always

Steps to Reproduce:
Open a JavaScript file with a line like 'object.property in ...' or 'object.property instanceof ...'. See attached screenshot for more information.

Actual Results:  
The 'in' or 'instanceof' operators are highlighted incorrectly.

Expected Results:  
The operators should have been highlighted in black boldface font.
Comment 1 Grzegorz Szymaszek 2018-04-25 15:28:38 UTC
Created attachment 112240 [details]
The attachment that @jec.bugs referred to.
Comment 2 Christoph Cullmann 2018-07-14 17:06:28 UTC
Git commit 364527746e3cf80a8b90e30981680ac0b479f73d by Christoph Cullmann, on behalf of Nibaldo González.
Committed on 14/07/2018 at 17:04.
Pushed by cullmann into branch 'master'.

CoffeeScript & JavaScript: fix member objects. Add .ts extension in JS
Related: bug 394365

Differential Revision: https://phabricator.kde.org/D13787

A  +58   -0    autotests/folding/test.coffee.fold
M  +7    -0    autotests/folding/test.js.fold
A  +65   -0    autotests/html/test.coffee.html
M  +7    -0    autotests/html/test.js.html
A  +58   -0    autotests/input/test.coffee
M  +7    -0    autotests/input/test.js
A  +58   -0    autotests/reference/test.coffee.ref
M  +7    -0    autotests/reference/test.js.ref
M  +8    -2    data/syntax/coffee.xml
M  +11   -7    data/syntax/javascript.xml

https://commits.kde.org/syntax-highlighting/364527746e3cf80a8b90e30981680ac0b479f73d