Null coalescing operator within template string literal breaks syntax highlighting
See original GitHub issue
This seems to be new as-of VSCode 1.31; we’ve had cases like this in our code for months and I only noticed the problem today. The problem doesn’t happen after removing the ??
(and the following value).
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
[JavaScript] Nullish coalescing operator(`??`) breaks highlight
I've tested with following code in https://codemirror.net/demo/theme.html function printWidgetTitle(widget) { const title ...
Read more >Understanding Template Literals in JavaScript - DigitalOcean
In this article, you will go over the differences between single/double-quoted strings and template literals, running through the various ways ...
Read more >In Vue.js, is there a way to keep component templates out of ...
The answer is ES6 template literals - string wrapped within `` : ... templates as part of your component and still get Syntax...
Read more >Nullish coalescing operator (??) - JavaScript - MDN Web Docs
The nullish coalescing (??) operator is a logical operator that returns its right-hand side operand when its left-hand side operand is null ......
Read more >Wrong syntax highlighting in TS/JS file with template strings in ...
The following construction is correctly starting the string, but not terminating it, and all the text after is written in red:
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
This issue is fixed in the latest release.
Yep, it looks like this was a regression in 0.0.22. I’ll look into this when I can. Some of the work in 0.0.22 is required for #33.