Enable empty environment (#2258)

This commit is contained in:
Ron Kok
2020-05-17 06:33:11 -07:00
committed by GitHub
parent d49da10d79
commit 4d99b4c8ac
2 changed files with 5 additions and 1 deletions

View File

@@ -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 = "";

View File

@@ -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();