fix: extract style/script tag followed by destructuring in the template#2921
Merged
dummdidumm merged 11 commits intosveltejs:masterfrom Feb 17, 2026
Merged
fix: extract style/script tag followed by destructuring in the template#2921dummdidumm merged 11 commits intosveltejs:masterfrom
dummdidumm merged 11 commits intosveltejs:masterfrom
Conversation
🦋 Changeset detectedLatest commit: 97908d5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
none that I can reproduce no |
|
Hey I just wanted to say I really appreciate you working on this issue. Looking forward to seeing it fixed. :) |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#2854 #2155
This builds upon the original logic of #2914. Replacing the
isInsideMoustacheTaglogic with a simple bracket match with a simplified string check. Using the Svelte compiler in this preprocessor isn't really viable because even the loose parse mode still throws a syntax error with an expression while editing.This also rewrites the parseHTML to use a custom parse logic instead of preprocess. Previously, we scanned the HTML to remove problematic "<" and ">". Now, it does one scan/parse. This should improve performance and might reduce memory usage since V8 won't store the preprocessed string in memory for the sliced string. The parse code is derived from vscode-html-languageservice, andthe main difference is
@abdel-17 Are there other problems you encountered like this?
@paoloricciuti, since you also commented #2914, could you check if there are other situations that aren't covered by this? This function is used to blank
<and>in HTML that confuses the vscode-html-languageservice's HTML parser.