-
-
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
Whitespace inside elements is not being preserved inside loops #713
Comments
don't strip whitespace at the end of an each block
thanks, fixed in 1.26 |
So, weird thing - it doesn't look like this was actually fixed: https://svelte.technology/repl?version=1.34.0&gist=10dd087fc24ff3dbf326c06b04e0611a I'm not sure how this is possible, since that test case in #718 seems to match it pretty exactly, but that repl still shows the issue even in 1.26.0. |
In that gist, if you take out the second paragraph about "^ Those letters should all have a space between them", then spaces do appear between the letters, which is kind of hilarious. edit: Also, perhaps more helpful for debugging, if you make sure there's no whitespace between the paragraph the each block (so you have // We want to remove trailing whitespace inside an element/component/block,
// *unless* there is no whitespace between this node and its next sibling but I don't know what the goal of this rule is. |
Been taking another look at this, and I'm still confused. I'm not sure what exactly the |
v3 repro from #2905: {#each ['dog', 'hen', 'fox', 'cat', 'pig', 'ant', 'cow', 'koi'] as value}
<span>{value} </span>
{/each}
<!-- Type or insert anything here to break spacing of list. --> |
Fixed in 3.5.4 (finally!!) |
Very related to bug #608.
Reproduction: https://svelte.technology/repl?version=1.25.0&gist=10dd087fc24ff3dbf326c06b04e0611a
The text was updated successfully, but these errors were encountered: