Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Text highlighting for ES6 template literals (backticks) in IntelliJ IDEA

Where should I look in the settings to remove the green background highlighting for text within the backticks? I think it is related to HTML in non-HTML files, probably it has nothing to do with quotes or backticks. I've been searching through settings the best I could.

enter image description here

like image 861
Johannes Avatar asked Jul 25 '16 11:07

Johannes


People also ask

How do you use Backticks in template literals?

In that case, the template literal is passed to your tag function, where you can then perform whatever operations you want on the different parts of the template literal. To escape a backtick in a template literal, put a backslash ( \ ) before the backtick. Dollar signs can be escaped as well to prevent interpolation.

Are template literals ES6?

Template Literals is an ES6 feature (JavaScript 2015). Template Literals is not supported in Internet Explorer.

What is template literals?

In this tutorial, you will learn about JavaScript Template Literals (Template Strings) with the help of examples. Template literals (template strings) allow you to use strings or embedded expressions in the form of a string. They are enclosed in backticks `` . For example, const name = 'Jack'; console.

Does es5 have template literals?

ECMAScript 2015 presents a new type of string literal called template literal. Fortunately it allows to embed JavaScript expressions into place holders ${expression} and create strings as easy as a pie. No more redundant concatenation operators and single quotes. The template literal makes the string easy to follow.


1 Answers

I finally found the answer. I'll let this stay in case anyone else wonders.

Editor -> Colors & Fonts -> General -> Injected language fragment -> Uncheck background on the right side panel

Cheers

enter image description here

like image 150
Johannes Avatar answered Oct 21 '22 00:10

Johannes