diff --git a/packages/svelte2tsx/src/htmlxtojsx_v2/nodes/AwaitPendingCatchBlock.ts b/packages/svelte2tsx/src/htmlxtojsx_v2/nodes/AwaitPendingCatchBlock.ts index 89a539e65..d322dd9c5 100644 --- a/packages/svelte2tsx/src/htmlxtojsx_v2/nodes/AwaitPendingCatchBlock.ts +++ b/packages/svelte2tsx/src/htmlxtojsx_v2/nodes/AwaitPendingCatchBlock.ts @@ -78,5 +78,5 @@ export function handleAwait(str: MagicString, awaitBlock: BaseNode): void { transforms.push('}'); } transforms.push('}'); - transform(str, awaitBlock.start, awaitBlock.end, awaitBlock.end, transforms); + transform(str, awaitBlock.start, awaitBlock.end, transforms); } diff --git a/packages/svelte2tsx/src/htmlxtojsx_v2/nodes/EachBlock.ts b/packages/svelte2tsx/src/htmlxtojsx_v2/nodes/EachBlock.ts index 4b394cab3..d10c96bb4 100644 --- a/packages/svelte2tsx/src/htmlxtojsx_v2/nodes/EachBlock.ts +++ b/packages/svelte2tsx/src/htmlxtojsx_v2/nodes/EachBlock.ts @@ -70,7 +70,7 @@ export function handleEach(str: MagicString, eachBlock: BaseNode): void { if (eachBlock.key) { transforms.push([eachBlock.key.start, eachBlock.key.end], ';'); } - transform(str, eachBlock.start, startEnd, startEnd, transforms); + transform(str, eachBlock.start, startEnd, transforms); const endEach = str.original.lastIndexOf('{', eachBlock.end - 1); // {/each} -> } or {:else} -> } diff --git a/packages/svelte2tsx/src/htmlxtojsx_v2/nodes/Element.ts b/packages/svelte2tsx/src/htmlxtojsx_v2/nodes/Element.ts index 5b0b30285..e7d1b4a55 100644 --- a/packages/svelte2tsx/src/htmlxtojsx_v2/nodes/Element.ts +++ b/packages/svelte2tsx/src/htmlxtojsx_v2/nodes/Element.ts @@ -205,7 +205,7 @@ export class Element { } if (this.isSelfclosing) { - transform(this.str, this.startTagStart, this.startTagEnd, this.startTagEnd, [ + transform(this.str, this.startTagStart, this.startTagEnd, [ // Named slot transformations go first inside a outer block scope because //
means "use the x of let:x", and without a separate // block scope this would give a "used before defined" error @@ -217,7 +217,7 @@ export class Element { ...this.endTransformation ]); } else { - transform(this.str, this.startTagStart, this.startTagEnd, this.startTagEnd, [ + transform(this.str, this.startTagStart, this.startTagEnd, [ ...slotLetTransformation, ...this.actionsTransformation, ...this.getStartTransformation(), @@ -230,7 +230,7 @@ export class Element { .lastIndexOf(`${this.node.name}`); // tagEndIdx === -1 happens in situations of unclosed tags like `fooo
anothertag
` const endStart = tagEndIdx === -1 ? this.node.end : tagEndIdx + this.node.start; - transform(this.str, endStart, this.node.end, this.node.end, this.endTransformation); + transform(this.str, endStart, this.node.end, this.endTransformation); } } diff --git a/packages/svelte2tsx/src/htmlxtojsx_v2/nodes/InlineComponent.ts b/packages/svelte2tsx/src/htmlxtojsx_v2/nodes/InlineComponent.ts index f4d6ba4f6..66f6d0818 100644 --- a/packages/svelte2tsx/src/htmlxtojsx_v2/nodes/InlineComponent.ts +++ b/packages/svelte2tsx/src/htmlxtojsx_v2/nodes/InlineComponent.ts @@ -207,7 +207,7 @@ export class InlineComponent { if (this.isSelfclosing) { this.endTransformation.push('}'); - transform(this.str, this.startTagStart, this.startTagEnd, this.startTagEnd, [ + transform(this.str, this.startTagStart, this.startTagEnd, [ // Named slot transformations go first inside a outer block scope because //