diff --git a/src/core/parser.ts b/src/core/parser.ts index 67e065ac8..801c145ab 100644 --- a/src/core/parser.ts +++ b/src/core/parser.ts @@ -793,7 +793,7 @@ export class Parser { this.beginContext({ mode: 'math', - mathstyle: '<$>' ? 'textstyle' : 'displaystyle', + mathstyle: final === '<$>' ? 'textstyle' : 'displaystyle', }); const result = this.scan((token) => token === final);