chore: remove `parser.template_untrimmed` (#16511)

pull/16513/head
Rich Harris 1 month ago committed by GitHub
parent 99452053af
commit 51771447c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
'svelte': patch
---
chore: remove `parser.template_untrimmed`

@ -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
@ -67,7 +61,6 @@ export class Parser {
}
this.loose = loose;
this.template_untrimmed = template;
this.template = template.trimEnd();
let match_lang;

@ -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++;
}
}
}
}
}

Loading…
Cancel
Save