[JavaScript] optional chaining operator breaks highlight
See original GitHub issueI see it’s added to the next CodeMirror but what about 5.xx?
Currently, using ?.
will break highlighting in seemingly unpredictable ways as seen in the official demo when adding ?.test
after context
in line 13:
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Optional chaining (?.) - JavaScript - MDN Web Docs - Mozilla
The optional chaining (?.) operator accesses an object's property or calls a function. If the object accessed or function called is ...
Read more >Optional chaining operator support in VSCode - Stack Overflow
VS Code 1.41 supports optional chaining in both JavaScript and TypeScript files. This support includes syntax highlighting and IntelliSense.
Read more >JavaScript Optional Chaining Operator (?.)
In this tutorial, you'll learn about the optional chaining operator (?.) that simplifies the way to access values through connected objects.
Read more >What is wrong with optional chaining and how to fix it - DEV ...
The operator tries to address issues of previously used && . This article tries to make a point that JS has Nullable, and...
Read more >Support optional chaining operator in JS (!21621) - GitLab.org
might break people's editor syntax highlighting. ... Simon Knox changed title from Support optional chaining operator in JS to Support optional?.chaining ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ah, don’t mind me, I had implemented (and was testing) a
.?
operator, instead of a?.
one. Attached patch should help.Retried now with hard refresh in three different browsers as well as tried the master branch locally => still seeing the bug. I’m talking about CodeMirror 5.xx, not the next big thing.