mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-08 12:38:39 +00:00
Enable an empty \substack (#2278)
This commit is contained in:
@@ -737,7 +737,7 @@ defineEnvironment({
|
||||
arraystretch: 0.5,
|
||||
};
|
||||
res = parseArray(context.parser, res, "script");
|
||||
if (res.body[0].length > 1) {
|
||||
if (res.body.length > 0 && res.body[0].length > 1) {
|
||||
throw new ParseError("{subarray} can contain only one column");
|
||||
}
|
||||
return res;
|
||||
|
@@ -2660,6 +2660,9 @@ describe("A substack function", function() {
|
||||
it("should accommodate macros in the argument", function() {
|
||||
expect`\sum_{\substack{ 0<i<\varPi \\ 0<j<\pi }} P(i,j)`.toBuild();
|
||||
});
|
||||
it("should accommodate an empty argument", function() {
|
||||
expect`\sum_{\substack{}} P(i,j)`.toBuild();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user