From 5dc3abedcb2af85372653342c4995307453dd508 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Sun, 14 Jun 2026 19:28:44 -0400 Subject: [PATCH] Ignore braces in array preamble. (mathjax/MathJax#3565) --- testsuite/tests/input/tex/Base.test.ts | 4 ++++ .../tests/input/tex/__snapshots__/Base.test.ts.snap | 12 ++++++++++++ ts/input/tex/ColumnParser.ts | 2 ++ 3 files changed, 18 insertions(+) diff --git a/testsuite/tests/input/tex/Base.test.ts b/testsuite/tests/input/tex/Base.test.ts index 6e06df5d7..0052be20f 100644 --- a/testsuite/tests/input/tex/Base.test.ts +++ b/testsuite/tests/input/tex/Base.test.ts @@ -4002,6 +4002,10 @@ describe('Complete Array', () => { expect(tex2mml('\\begin{array}{> {x} c} X \\end{array}')).toMatchSnapshot(); }); + it('column { }', () => { + expect(tex2mml('\\begin{array}{{c}} X \\end{array}')).toMatchSnapshot(); + }); + it('BadPreamToken', () => { expectTexError('\\begin{array}a').toBe('Illegal pream-token (a)'); }); diff --git a/testsuite/tests/input/tex/__snapshots__/Base.test.ts.snap b/testsuite/tests/input/tex/__snapshots__/Base.test.ts.snap index bc59e9aa3..db75f586c 100644 --- a/testsuite/tests/input/tex/__snapshots__/Base.test.ts.snap +++ b/testsuite/tests/input/tex/__snapshots__/Base.test.ts.snap @@ -1872,6 +1872,18 @@ exports[`Complete Array column @ p m 1`] = ` " `; +exports[`Complete Array column { } 1`] = ` +" + + + + X + + + +" +`; + exports[`Complete Array column b 1`] = ` " diff --git a/ts/input/tex/ColumnParser.ts b/ts/input/tex/ColumnParser.ts index a0beec563..e4c8a7133 100644 --- a/ts/input/tex/ColumnParser.ts +++ b/ts/input/tex/ColumnParser.ts @@ -94,6 +94,8 @@ export class ColumnParser { // Ignored // ' ': (_state) => {}, + '{': (_state) => {}, + '}': (_state) => {}, }; /**