Skip to content

Commit 9479312

Browse files
authored
Merge pull request #1448 from mathjax/tests/fix_backslashes
Fix backslash issues discovered during Linting
2 parents da32350 + b7a7df3 commit 9479312

File tree

4 files changed

+6
-9
lines changed

4 files changed

+6
-9
lines changed

testsuite/tests/input/tex/Base.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1542,7 +1542,7 @@ describe('Environment Errors', () => {
15421542
});
15431543

15441544
it('Template loop', () => {
1545-
expectTexError('\\begin{array}{r@{a\\\\b}l}a&b\\\end{array}').toBe(
1545+
expectTexError('\\begin{array}{r@{a\\\\b}l}a&b\\end{array}').toBe(
15461546
'Maximum template substitutions exceeded; is there an invalid use of \\\\ in the template?'
15471547
);
15481548
});
@@ -3448,7 +3448,7 @@ describe('Linebreaks', () => {
34483448
});
34493449

34503450
it('allowbreak cdot', () => {
3451-
expect(tex2mml('a\\allowbreak \cdot b')).toMatchSnapshot();
3451+
expect(tex2mml('a\\allowbreak \\cdot b')).toMatchSnapshot();
34523452
});
34533453

34543454
it('goodbreak', () => {

testsuite/tests/input/tex/Bussproofs.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ describe('BussproofsRegProofs', () => {
197197
it('Proof Mixing Order', () => {
198198
expect(
199199
tex2mml(
200-
'\\begin{prooftree}\\alwaysRootAtTop\\AXC{}\\RL{$Hyp^{1}$}\\UIC{$P$}\\AXC{$P\\rightarrow Q$}\\RL{$\\rightarrow_E$}\\solidLine\\BIC{$Q^2$}\\alwaysRootAtBottom\\AXC{$Q\\rightarrow R$} \\RL{$\\rightarrow_E$} \\BIC{$R$} \\AXC{$Q$}\\RL{Rit$^2$} \\UIC{$Q$}\\RL{$\\wedge_I$}\\BIC{$Q\\wedge R$}\\RL{\${\\rightarrow_I}^1$}\\UIC{$P\\rightarrow Q\\wedge R$}\\end{prooftree}'
200+
'\\begin{prooftree}\\alwaysRootAtTop\\AXC{}\\RL{$Hyp^{1}$}\\UIC{$P$}\\AXC{$P\\rightarrow Q$}\\RL{$\\rightarrow_E$}\\solidLine\\BIC{$Q^2$}\\alwaysRootAtBottom\\AXC{$Q\\rightarrow R$} \\RL{$\\rightarrow_E$} \\BIC{$R$} \\AXC{$Q$}\\RL{Rit$^2$} \\UIC{$Q$}\\RL{$\\wedge_I$}\\BIC{$Q\\wedge R$}\\RL{${\\rightarrow_I}^1$}\\UIC{$P\\rightarrow Q\\wedge R$}\\end{prooftree}'
201201
)
202202
).toMatchSnapshot();
203203
});

testsuite/tests/input/tex/Newcommand.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ describe('Nested Environments', () => {
555555
tex2mml(
556556
[
557557
'\\newenvironment{boxed}{\\begin{array}{|c|c|}\\hline}{\\\\\\hline\\end{array}}',
558-
'\\begin{boxed}\\begin{boxed}a&b\\\\c&d\\end{boxed} & X \\\end{boxed}',
558+
'\\begin{boxed}\\begin{boxed}a&b\\\\c&d\\end{boxed} & X \\end{boxed}',
559559
].join('')
560560
)
561561
).toMatchSnapshot();

testsuite/tests/input/tex/__snapshots__/Base.test.ts.snap

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4480,13 +4480,10 @@ exports[`Linebreaks allowbreak 1`] = `
44804480
`;
44814481
44824482
exports[`Linebreaks allowbreak cdot 1`] = `
4483-
"<math xmlns="http://www.w3.org/1998/Math/MathML" data-latex="a\\allowbreak cdot b" display="block">
4483+
"<math xmlns="http://www.w3.org/1998/Math/MathML" data-latex="a\\allowbreak \\cdot b" display="block">
44844484
<mi data-latex="a">a</mi>
44854485
<mspace data-latex="\\allowbreak"></mspace>
4486-
<mi data-latex="c">c</mi>
4487-
<mi data-latex="d">d</mi>
4488-
<mi data-latex="o">o</mi>
4489-
<mi data-latex="t">t</mi>
4486+
<mo data-latex="\\cdot">&#x22C5;</mo>
44904487
<mi data-latex="b">b</mi>
44914488
</math>"
44924489
`;

0 commit comments

Comments
 (0)