-
-
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
#each with animate: doesn't allow comments #3999
Comments
Possible workaround: move the comment just inside the element with the {#each colors as color (color)}
<!-- comment -->
<div animate:flip>
{color}
</div>
{/each} to this: {#each colors as color (color)}
<div animate:flip>
<!-- comment -->
{color}
</div>
{/each} Won't help in all cases, such as if the animating div itself has a child with an |
Just ran into this issue as well. Really frustrating that the language server is even picking up comment blocks. @rmunn Thanks for the tip with the workaround. |
This is pain when I want to disable an element temporarily, when I to try out animation with a temporary |
This is supported now in 3.48.0 - https://svelte.dev/repl/aa902b5c51fd4e79be8dda8267fe7485?version=3.48.0 |
Describe the bug
The combination of #each and the animate directive doesn't allow comments.
To Reproduce
See https://svelte.dev/repl/aa902b5c51fd4e79be8dda8267fe7485?version=3.15.0.
There will be an error message at the bottom.
If the comment is deleted, the error goes away.
Expected behavior
Comments should be ignored and not cause an error.
Severity
This prevents documenting some code.
The text was updated successfully, but these errors were encountered: