mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-06 19:58:40 +00:00
Make supsub work with empty nucleus
Auditors: emily
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
var buildTree = require("../buildTree");
|
||||
var parseTree = require("../parseTree");
|
||||
|
||||
describe("A parser", function() {
|
||||
@@ -286,6 +287,26 @@ describe("A subscript and superscript parser", function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe("A subscript and superscript tree-builder", function() {
|
||||
it("should not fail when there is no nucleus", function() {
|
||||
expect(function() {
|
||||
buildTree(parseTree("^3"));
|
||||
}).not.toThrow();
|
||||
|
||||
expect(function() {
|
||||
buildTree(parseTree("_2"));
|
||||
}).not.toThrow();
|
||||
|
||||
expect(function() {
|
||||
buildTree(parseTree("^3_2"));
|
||||
}).not.toThrow();
|
||||
|
||||
expect(function() {
|
||||
buildTree(parseTree("_2^3"));
|
||||
}).not.toThrow();
|
||||
});
|
||||
});
|
||||
|
||||
describe("A group parser", function() {
|
||||
it("should not fail", function() {
|
||||
expect(function() {
|
||||
|
Reference in New Issue
Block a user