mirror of
https://github.com/markedjs/marked.git
synced 2026-11-30 16:48:05 +01:00
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:
+3
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user