Incorrect highlighting of HTML within a JS string

Hi all,

I just installed and configured Webstore on my workstation and found that strings declared in my JS projects which include HTML are not being highlighted as Strings according to the editor color settings. Instead the contained HTML is highlighted as if it was a HTML document as seen below:



Now I searched the internet for a while and came up with some posts claiming that this can be fixed by going to Settings > Editor > Language Injections and disabling certain entries. But no matter what I disabled - at some point I even disabled all entries - nothing helped fixing the issue.

I also restarted Webstorm after every change in the settings, it just doesn't want to work.

Is there something I'm missing?

0
5 comments

Hi Elena,

you're totally right, my bad. I obviously misclicked.

Thanks a lot for the hint, it resolves the issue.

1

This is expected - WebStorm auto-injects HTML in string literals if they include HTML tags. These predefined injections can't be disabled in Settings > Editor > Language Injections.

You can try disabling editor.injected.highlighting.enabled Registry option - see https://youtrack.jetbrains.com/issue/WEB-1475#comment=27-702610

Note that you will likely need to re-open the project after changing the key

0

Thanks for the fast feedback. 

I followed @Dennis Ushakov's instructions, but when I go to Help > Find Action and search for "Registry" all I get is the Docker registry in the "Build, Execution, Deployment" section of the settings. This does not seem correct.

Any Ideas?


0

Also Ushakov's comment turns out to be more than 5 years old. Are you sure this information is still up-to-date?

FYI: Im running the latest version of Webstorm 2019.1.3 

0

> when I go to Help > Find Action and search for "Registry" all I get is the Docker registry in the "Build, Execution, Deployment" section of the settings

Registry is definitely there, the first item in the search results:

 

 

>Are you sure this information is still up-to-date?

 

Yes:)

0

Please sign in to leave a comment.