From 7fe35b84a37164f38e58ff7b377013203852f29f Mon Sep 17 00:00:00 2001 From: "codefix-patchflow[bot]" <292349666+codefix-patchflow[bot]@users.noreply.github.com> Date: Fri, 19 Jun 2026 04:09:10 +0000 Subject: [PATCH] fix: isolate lexer defaults per instance --- src/Lexer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Lexer.ts b/src/Lexer.ts index 84560a1b6c..3275aecdf7 100644 --- a/src/Lexer.ts +++ b/src/Lexer.ts @@ -24,7 +24,7 @@ export class _Lexer { // TokenList cannot be created in one go this.tokens = [] as unknown as TokensList; this.tokens.links = Object.create(null); - this.options = options || _defaults; + this.options = { ..._defaults, ...options }; this.options.tokenizer = this.options.tokenizer || new _Tokenizer(); this.tokenizer = this.options.tokenizer; this.tokenizer.options = this.options;