Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions testsuite/tests/input/tex/Base.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)');
});
Expand Down
12 changes: 12 additions & 0 deletions testsuite/tests/input/tex/__snapshots__/Base.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1872,6 +1872,18 @@ exports[`Complete Array column @ p m 1`] = `
</math>"
`;

exports[`Complete Array column { } 1`] = `
"<math xmlns="http://www.w3.org/1998/Math/MathML" data-latex="\\begin{array}{{c}} X \\end{array}" display="block">
<mtable columnspacing="1em" rowspacing="4pt" data-frame-styles="" framespacing=".5em .125em" data-latex="\\begin{array}{{c}} X \\end{array}">
<mtr data-latex="{{c}}">
<mtd>
<mi data-latex="X">X</mi>
</mtd>
</mtr>
</mtable>
</math>"
`;

exports[`Complete Array column b 1`] = `
"<math xmlns="http://www.w3.org/1998/Math/MathML" data-latex="\\begin{array}{b{1cm}b{1cm}b{1cm}}a &amp; b &amp;c\\\\ d &amp; e &amp; f\\end{array}" display="block">
<mtable columnspacing="1em" rowspacing="4pt" columnalign="left left left" columnwidth="1cm 1cm 1cm" data-frame-styles="" framespacing=".5em .125em" data-latex="\\text{f}\\end{array}">
Expand Down
2 changes: 2 additions & 0 deletions ts/input/tex/ColumnParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ export class ColumnParser {
// Ignored
//
' ': (_state) => {},
'{': (_state) => {},
'}': (_state) => {},
};

/**
Expand Down
Loading