mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-11 05:58:40 +00:00
Add \gt and \lt
This commit is contained in:
@@ -1248,7 +1248,7 @@ describe("A font parser", function () {
|
||||
it("should not parse a series of font commands", function () {
|
||||
expect("\\mathbb \\mathrm R").toNotParse();
|
||||
});
|
||||
|
||||
|
||||
it("should nest fonts correctly", function () {
|
||||
var bf = getParsed("\\mathbf{a\\mathrm{b}c}")[0];
|
||||
expect(bf.value.type).toMatch("font");
|
||||
@@ -1259,7 +1259,7 @@ describe("A font parser", function () {
|
||||
expect(bf.value.body.value[1].value.font).toMatch("mathrm");
|
||||
expect(bf.value.body.value[2].value).toMatch("c");
|
||||
});
|
||||
|
||||
|
||||
it("should have the correct greediness", function() {
|
||||
expect("e^\\mathbf{x}").toParse();
|
||||
});
|
||||
@@ -1752,3 +1752,12 @@ describe("A parser that does not throw on unsupported commands", function() {
|
||||
expect(parsedInput[0].value.color).toBe(errorColor);
|
||||
});
|
||||
});
|
||||
|
||||
describe("The symbol table integraty", function() {
|
||||
it("should treat certain symbols as synonyms", function() {
|
||||
expect(getBuilt("<")).toEqual(getBuilt("\\lt"));
|
||||
expect(getBuilt(">")).toEqual(getBuilt("\\gt"));
|
||||
expect(getBuilt("\\left<\\frac{1}{x}\\right>"))
|
||||
.toEqual(getBuilt("\\left\\lt\\frac{1}{x}\\right\\gt"));
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user