-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An error appears randomly when using "css" function inside template string - ':' term expected" #76
Comments
Looks like it's still an issue |
Confirmed. Another workaround is putting the css string at the end. Error:
No Error:
|
👀 |
This Issue has been open for almost a year now without any comment by maintainers.
Thank you for you support I keep thinking there's an error in my file while it's simply this bug. |
The most annoying part of this issue is fixed in the latest 203 EAP, it was a bug inside the platform. I mean strange errors in those cases (issue):
The next kind of errors should be fixed by the PR above. It's more complicated because it can't be fixed in 100% of cases. The provided heuristic checks whether the expression inside the template literal contains nested style-components injection. If so, we can assume that this expression is a complete and valid CSS fragment. For more details, see the pull request itself.
Also, the 203 EAP finally allows formatting injections with multiple parts (issue). It works in the IDE by default, but for this plugin it will be enabled by the same PR above. |
@rosdi this is the wrong repository for your problem. |
sorry... deleted. |
Does this support |
WebStorm 2019.2.3
Build #WS-192.6817.13, built on September 24, 2019
Runtime version: 11.0.4+10-b304.69 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.6
1.0.11
Problem description:
In some cases, when there is a
css
function inside templated string I'm getting the following error:':' term expected
This error doesn't appear all the time. If I play around with the code it will randomly hide and appear later on. This error only appears when the plugin is enabled, so I assume it comes from it. This behavior seems to be a regression since I've been using the plugin for a long time and never saw it before.
Example of code that this error sometimes appear:
Screenshot:
Adding/Removing a semicolon doesn't help. The only solution I found so far is to avoid nesting
css
entirely.The text was updated successfully, but these errors were encountered: