Skip to content
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

Error when using animate flip if there is no space in front of each block #5415

Closed
xxdocobxx opened this issue Sep 17, 2020 · 2 comments · Fixed by #5477
Closed

Error when using animate flip if there is no space in front of each block #5415

xxdocobxx opened this issue Sep 17, 2020 · 2 comments · Fixed by #5477
Labels

Comments

@xxdocobxx
Copy link

Describe the bug
I got an error message An element that use the animate directive must be the sole child of a keyed each block when using animate flip if there is no space in front of each block.

To Reproduce
https://svelte.dev/repl/1661180017a5479caf0b6451c6279a7a?version=3.25.1

Additional context
I use inline blocks on my project, excess spaces must be removed to make the layout accurate.
So I use preprocessor like this ( #189 (comment) ) to remove all excess spaces between tags, but it will then cause the above error.

@ehrencrona
Copy link
Contributor

Here's a more minimalistic reproduction. The following does not parse:

<div>{#each [] as n (n)} <div animate:flip /> {/each}</div>

@stale
Copy link

stale bot commented Jun 27, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants