You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@brunnerh Looks like the relevant bit from the migration docs is this:
Whitespace between nodes is collapsed to one whitespace
That makes sense, but I'm surprised that logic applies to an {#if} block when it's not rendered. Should a node that's not in the DOM count as a node? Happy to close this issue if that's the case, but it might be worth clarifying this behavior somewhere in the docs at least.
Should a node that's not in the DOM count as a node?
Maybe not, though it looks like it currently does and changing it probably is not an option without a major version.
Regarding documentation, it would be nice to have a section on whitespace handling somewhere at the end of the basic markup section, especially since currently it only seems to be mentioned in the migration guide.
Describe the bug
An unnecessary space is included in the HTML output of elements that include an
{#if}
block that is not rendered.Reproduction
https://svelte.dev/playground/hello-world?version=5.25.6#H4sIAAAAAAAAE5WRsU7DMBCGX-VkGFopSvaQVnToxsiGGVznolh1HMu-0qIoKw_AI_Ik2EkpjdoiMfr3_f99d9cxIxpkOVsfyAnwVkgEURE6UBVsdCu3LGGV0uhZ_tIxerexOgpBP3pX1qb-DTVFbSM8XtNlawgNhRhWeOmUpSU3nFRjW0fwpMwWKtc2wFmaxdfRydkDN0X26zCFHYwrA3jGrDwoI_WuxBL2NRqgGk8jxF_TEjg0JTos8xhQDD1rh9WCs5rI-jzL8CAaqzGVbcPZcj2-QIfKYqBappHGnoM81yFy7DAhukrxT4IYiM4I_SdK2C6FQpaT22Gf3LjS2VKnZ5p-3LiTRoIuoiYnJlhAJbTHBGStdBlG64N0b11r_Wx-cTYx-vshrnscN3Gyzub9oN-Fbf006L8-PrtMVX2MEheDvoaXUHqvTMnygaT_BuckIsrPAgAA
Logs
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: