fix: robustify comment handling in parser#18087
Conversation
🦋 Changeset detectedLatest commit: 726b764 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 |
|
|
Gah — this is failing because the parser is more robust than before (it handles comments inside patterns) but not robust enough. It can't distinguish regex opening characters from division operators, which is a famously annoying problem. Even once you've solved that part, you're still not totally out of the woods, because a At least part of this would be easier if we had a |
|
Ok I updated |
|
Putting a pin in this for now. Summary:
|
The more I looked into the parser code (spurred by #17954) the more stuff I found to fix. There's a lot of duplication at present, as well as some subtle bugs. This PR fixes those bugs and removes >130 LOC.
Before submitting the PR, please make sure you do the following
feat:,fix:,chore:, ordocs:.packages/svelte/src, add a changeset (npx changeset).Tests and linting
pnpm testand lint the project withpnpm lint