-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: trim whitespace while migrating blocks (#13941)
Co-authored-by: Oscar Dominguez <[email protected]>
- Loading branch information
1 parent
7be3afb
commit 12fcc7a
Showing
4 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'svelte': patch | ||
--- | ||
|
||
fix: trim whitespace while migrating blocks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
packages/svelte/tests/migrate/samples/remove-blocks-whitespace/input.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ @html "some html" } | ||
|
||
{ #if false && { | ||
|
||
}.x === 34 } | ||
true | ||
{ :else if false } | ||
false | ||
{/if} | ||
|
||
{ #await [] } | ||
{ @const x = 43 } | ||
{x} | ||
{ :then i } | ||
{i} | ||
{ :catch e } | ||
dlkdj | ||
{/await} | ||
|
||
{ #await [] then i } | ||
stuff | ||
{/await} | ||
|
||
{ #key count } | ||
dlkdj | ||
{/key} | ||
|
26 changes: 26 additions & 0 deletions
26
packages/svelte/tests/migrate/samples/remove-blocks-whitespace/output.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{@html "some html"} | ||
|
||
{#if false && { | ||
|
||
}.x === 34} | ||
true | ||
{:else if false} | ||
false | ||
{/if} | ||
|
||
{#await []} | ||
{@const x = 43} | ||
{x} | ||
{:then i} | ||
{i} | ||
{:catch e} | ||
dlkdj | ||
{/await} | ||
|
||
{#await [] then i} | ||
stuff | ||
{/await} | ||
|
||
{#key count} | ||
dlkdj | ||
{/key} |