httpNick httpNick - 1 year ago 294
Javascript Question

WebStorm highlighting for multi-line strings

I am following the Angular 2 tutorial off of the docs and have added a couple multi-line strings which are causing terrible syntax highlighting problems in WebStorm. The syntax highlighting issues I am talking about are the green shaded parts that cover each empty part of the multi-line string.

Is this expected? If not, does anyone know how to fix this / get support for this in WebStorm?

I am using WebStorm v2016.2.4 and have the Angular plugin installed.

enter image description here

Answer Source

That color (assuming that you are using Darcula) means Injected Language fragment where different to the actual file language is injected (e.g. HTML inside JavaScript file).

To remove or change such background color:

  1. Settings/Preferences
  2. Editor | Colors & Fonts | General
  3. Code | Injected language fragment -- you may change or remove background color here.

The green shaded part around each empty part of the line. Is this an expected behavior?

The green part is expected -- it's default color.

Tags are not colored because they have own background .. so they simply overriding injected fragment background. Remove background from tags .. and you should have more solid green/non-interrupted background (easier to the eye).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download