Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/shiny-berries-call.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte': patch
---

chore: remove `parser.template_untrimmed`
7 changes: 0 additions & 7 deletions packages/svelte/src/compiler/phases/1-parse/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ export class Parser {
*/
template;

/**
* @readonly
* @type {string}
*/
template_untrimmed;

/**
* Whether or not we're in loose parsing mode, in which
* case we try to continue parsing as much as possible
Expand Down Expand Up @@ -67,7 +61,6 @@ export class Parser {
}

this.loose = loose;
this.template_untrimmed = template;
this.template = template.trimEnd();

let match_lang;
Expand Down
8 changes: 0 additions & 8 deletions packages/svelte/src/compiler/phases/1-parse/state/element.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,14 +370,6 @@ export default function element(parser) {
// ... or we're followed by whitespace, for example near the end of the template,
// which we want to take in so that language tools has more room to work with
parser.allow_whitespace();
if (parser.index === parser.template.length) {
while (
parser.index < parser.template_untrimmed.length &&
regex_whitespace.test(parser.template_untrimmed[parser.index])
) {
parser.index++;
}
}
}
}
}
Expand Down
Loading