mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 19:28:39 +00:00
committed by
Kevin Barabash
parent
db1cccdeab
commit
6e75ebdc2d
@@ -96,6 +96,14 @@ function parseArray(
|
||||
if (next === "&") {
|
||||
parser.consume();
|
||||
} else if (next === "\\end") {
|
||||
// Arrays terminate newlines with `\crcr` which consumes a `\cr` if
|
||||
// the last line is empty.
|
||||
const lastRow = body[body.length - 1][0].value;
|
||||
if (body.length > 1
|
||||
&& lastRow.value.length === 1
|
||||
&& lastRow.value[0].value.length === 0) {
|
||||
body.pop();
|
||||
}
|
||||
break;
|
||||
} else if (next === "\\\\" || next === "\\cr") {
|
||||
const cr = parser.parseFunction();
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
BIN
test/screenshotter/images/ArrayRemoveEmptyLine-chrome.png
Normal file
BIN
test/screenshotter/images/ArrayRemoveEmptyLine-chrome.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.5 KiB |
BIN
test/screenshotter/images/ArrayRemoveEmptyLine-firefox.png
Normal file
BIN
test/screenshotter/images/ArrayRemoveEmptyLine-firefox.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.5 KiB |
@@ -38,6 +38,11 @@ ArrayMode:
|
||||
\end{matrix}
|
||||
display: 1
|
||||
ArrayType: 1\begin{array}{c}2\\3\end{array}4
|
||||
ArrayRemoveEmptyLine: |
|
||||
\begin{pmatrix}
|
||||
1 \\
|
||||
2 \\
|
||||
\end{pmatrix}
|
||||
Baseline: a+b-c\cdot d/e
|
||||
BasicTest: a
|
||||
BinCancellation: |
|
||||
|
Reference in New Issue
Block a user