简体   繁体   中英

WebStorm HTML formatting error - Expecting newline or semicolon

I am editing an HTML page in WebStorm. For some reason it's treating regular text like a JavaScript statement and throwing errors on code check 'Expecting newline or semicolon'. If the text is within an anchor tag it does not give an error.

Is this a bug? My JavaScript version is set to ES6.

HTML text showing an error:

在此处输入图片说明

WebStorm code check error:

在此处输入图片说明

  1. Go to Settings/Preferences | Editor | Language Injections Settings/Preferences | Editor | Language Injections
  2. Please remove 3rd rule from the bottom (the one that has "IDE" in Scope column)

You somehow (accidentally) created such wrong injection rule and now every <li> tag is treated as AngularJS hence the warnings.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM