mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-10 21:48:41 +00:00
Enable empty environment (#2258)
This commit is contained in:
@@ -435,7 +435,7 @@ const mathmlBuilder: MathMLBuilder<"array"> = function(group, options) {
|
||||
let menclose = "";
|
||||
let align = "";
|
||||
|
||||
if (group.cols) {
|
||||
if (group.cols && group.cols.length > 0) {
|
||||
// Find column alignment, column spacing, and vertical lines.
|
||||
const cols = group.cols;
|
||||
let columnLines = "";
|
||||
|
@@ -1247,6 +1247,10 @@ describe("A begin/end parser", function() {
|
||||
expect`\begin{array}{cc}a&b\\c&d\end{array}`.toParse();
|
||||
});
|
||||
|
||||
it("should parse and build an empty environment", function() {
|
||||
expect`\begin{aligned}\end{aligned}`.toBuild();
|
||||
});
|
||||
|
||||
it("should parse an environment with hlines", function() {
|
||||
expect`\begin{matrix}\hline a&b\\ \hline c&d\end{matrix}`.toParse();
|
||||
expect`\begin{matrix}\hdashline a&b\\ \hdashline c&d\end{matrix}`.toParse();
|
||||
|
Reference in New Issue
Block a user