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;