fix: set AST root.start to 0 and root.end to template.length#17125
fix: set AST root.start to 0 and root.end to template.length#17125Rich-Harris merged 4 commits intosveltejs:mainfrom
root.start to 0 and root.end to template.length#17125Conversation
🦋 Changeset detectedLatest commit: 6d77bd4 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 |
|
| "js": [], | ||
| "start": null, | ||
| "end": null, | ||
| "type": "Root", |
There was a problem hiding this comment.
before the fix:
"js": [],
"start": 54,
"end": 53,
"type": "Root",|
I kinda feel like |
|
Oh yeah that seems quite correct to me. |
|
/ecosystem-ci run |
|
📝 Ran ecosystem CI on ✅ eslint-plugin-svelte, language-tools, storybook, rollup-plugin-svelte, skeleton, mdsvex, melt-ui, sv, svelte-preprocess, prettier-plugin-svelte, svelte-loader, svelte-eslint-parser, sveltekit, vite-plugin-svelte |
root.start to 0 and root.end to template.length
renamed from "fix: set Root start/end to null when fragment contains only whitespace" to the actual fix
This fixes a small parser bug where the AST root start/end values are invalid (
start > end) for components with script and style tags but no markup.before:
after:
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