fix: improve lexing inline elements step's performance (#3146)

* refac: improve lexing inline elements step's performance

* refac: clear out queue after tokens have been inlined
This commit is contained in:
Spencer Whitehead
2023-12-30 20:27:45 -06:00
committed by GitHub
parent baed07ab54
commit 4f87b2ac7b
+3 -2
View File
@@ -89,10 +89,11 @@ export class _Lexer {
this.blockTokens(src, this.tokens);
let next;
while (next = this.inlineQueue.shift()) {
for (let i = 0; i < this.inlineQueue.length; i++) {
const next = this.inlineQueue[i];
this.inlineTokens(next.src, next.tokens);
}
this.inlineQueue = [];
return this.tokens;
}