0

I can't figure out why PhpStorm IDE is treating src HTML attribute as a JavaScript code (or a kind of regular expression). After code inspection this error is assigned to "JavaScript validity issues".

Have someone resolved this error before? Can I solve it some other way than turning off inspection?

Expression statement is not assignment or call

pfcode
  • 35
  • 7
  • 1
    Somehow you have made this happen (yes, this is user-created issue -- you must have been typing/pressing lots of keys too fast without looking at a screen). Please post screenshot of your `Settings/Preferences | Editor | Language Injections` – LazyOne Apr 19 '16 at 08:40
  • Oh well, I had the "xml: img/@src" injection checked. Thanks for the solution! – pfcode Apr 19 '16 at 08:48

1 Answers1

1

As @LazyOne wrote, the solution to this issue was to uncheck the xml: img/@src language injection in Settings/Preferences | Editor | Language Injections:

PhpStorm preferences

pfcode
  • 35
  • 7
  • 1
    Not to just "uncheck" but to actually delete that rule. You have created that rule by mistake without even noticing it -- there is no reason at all to still keep it there .. and then few months/year later wonder what it's for and why it's disabled. – LazyOne Apr 19 '16 at 08:52