-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Reserved keywords cause error when used in an expression with spaces around the keyword #1445
Comments
I haven't tested this but I think we should be able to fix this with just a |
Actually, this is currently working with things like |
Ah, right here. |
How swift! Thank you for this. |
allow spaces around reserved words used in tags in attributes
released 2.5.1 with the fix — thanks |
When using reserved JavaScript keywords in an expression, if the expression has spaces in between the curly brackets and the keyword, the parser will throw an error.
This throws:
<div class="{ class }"></div>
But this does not:
<div class="{class}"></div>
This goes for all JS keywords. I've tested
import
,export
, andclass
at least.REPL with failing test case: https://svelte.technology/repl?version=2.5.0&gist=9d4b8a0c733a48397d8a66feb9881fa5
REPL with passing test case: https://svelte.technology/repl?version=2.5.0&gist=6149f93a9af8cbc6286a335b8afbfaec
The text was updated successfully, but these errors were encountered: