-
-
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: default values in object destructuring (#14554)
* fix: enhance string/expression length check and fix closing character issues * docs: add documentation for unterminated_string_constant error * test: add tests for object destructuring with default values in "each" blocks * Update .changeset/clean-planets-rush.md * refactor: clean up unnecessary comments and whitespace * fix: resolve formatting issues * simplify * tweak * regenerate --------- Co-authored-by: Rich Harris <[email protected]>
- Loading branch information
1 parent
4aadb34
commit 48e3db2
Showing
9 changed files
with
1,806 additions
and
25 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: handle default values in object destructuring within "each" blocks when using characters like "}" and "]" |
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
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
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
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
9 changes: 9 additions & 0 deletions
9
...lte/tests/parser-modern/samples/each-block-object-pattern-special-characters/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,9 @@ | ||
{#each x as { y = 'z' }}{/each} | ||
|
||
{#each x as { y = '{' }}{/each} | ||
|
||
{#each x as { y = ']' }}{/each} | ||
|
||
{#each x as { y = `${`"`}` }}{/each} | ||
|
||
{#each x as { y = `${`John`}` }}{/each} |
Oops, something went wrong.